A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://react-unity-webgl.dev/docs/main-concepts/unity-config below:

Website Navigation


Unity Config | React Unity WebGL

Unity Config

When rendering your Unity Application within a React Application, you'll have to pass along the Unity Provider to the Unity Component. When the Unity Component is being mounted, it will take the Unity Context's configuration and initialises the required resources in order to render your Unity Application. During this process, the Unity Context's state will be updated to reflect the Unity Application's.

When using the Unity Context hook, you'll need to provide a Unity Config object. A most basic Unity Config consists the four following properties. These four properties are all URLs which are required to initialise the Unity Application.

caution

All of the URLs which can be provided to the Unity Config, including the ones mentioned above, are due to their enormous size not included into your bundle. You should place these files in a public directory within your project or use a CDN. This means the files behind these URLs are loaded during runtime and should be accessible by the browser via a public URL.

There are many more properties you can pass to the Unity Config object. These properties are all optional and can be found in the documentation.

Sounds complicated? No worries, you don't need to remember any of the meanings behind these files. The module will take care of all of this for you. Just add the paths to the files to the Unity Context, sit back and enjoy!


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4