poyxp.blogg.se

Unity pc build files
Unity pc build files





unity pc build files unity pc build files

For my example, I have a GameObject in my MainScene called ReactApi with a script containing a function called HandleCallbackīecause I wanted to have callbacks whenever Unity talks to the browser Javascript, I store a dictionary of callbacks associated with their index in the ReactApi.cs file. This will call the specified function on the specified GameObject. You can see this implemented in the PlugUtils.js class in our React app. An example of this can be seen in the PlugUtilsInternal class in the PlugUtils.cs file.įor the 2nd functionality, we call unit圜nd("GameObjectName", “FunctionName", jsonData) from our React javascript code. To call these functions, you have to import them into C#. jslib plugins can dispatch events to the React browser Javascript by calling dispatchReactUnityEvent("EventName") You can see this implemented in the PlugUtils.jslib file in the Unity project. If you have the react-unity-webgl module installed, these. jslib plugins in Unity that allow us to write pseudo-Javascript (often called UnityScript). The documentation for it can be found here: įor the 1st functionality, we use. Browser Javascript dispatches events to Unityįor both of these, we use an npm module called react-unity-webgl.Unity C# dispatches events to browser Javascript.There are 2 functionalities needed for Plug Wallet integration to work:







Unity pc build files