-
Notifications
You must be signed in to change notification settings - Fork 50
Installation
Gokhan Kurt edited this page Mar 6, 2021
·
4 revisions
You can use quick start wizard by selecting React > Quick Start from Unity menu. After that, you can open [Unity_Project_Root]/react in Visual Studio Code or any other Typescript IDE to start editing your UI.
You can run npm run watch from this folder to automatically update the output whenever a file changes. By default this will create a file in [Unity_Project_Root]/Assets/Resources/react/index.js, which will be used by ReactUnity component to render the UI. ReactUnity component must be set-up with a Canvas to take effect.

Some features are disabled by default for the sake of trimming down the build size. Following steps are optional and they are only needed if you are planning to use the corresponding features.
- To use border-radius feature,
com.unity.vectorgraphicsmodule must be added. -
REACT_DEV_SERVER_APIbuild flag must be defined to use dev server outside editor. -
REACT_FILE_APIbuild flag must be defined to set script source to file. -
REACT_URL_APIbuild flag must be defined to set script source to url.