/react-unity

React renderer for building user interfaces in Unity UI

Primary LanguageJavaScriptMIT LicenseMIT

React Unity

openupm GitHub Wiki

React Unity is a way to build interactive UI in Unity3D using the popular React framework. It is designed to support CSS-like features and Flex layout system.

Requirements

  • Node.js version 10 or above is required on the development machine. (Version 12 recommended)
  • Tested in Unity 2019.3

Installing

Install via OpenUPM

openupm add com.kurtgokhan.react-unity

Or add manually by editing manifest.json

{
  "dependencies": {
    "com.kurtgokhan.react-unity": "https://github.com/KurtGokhan/react-unity.git",
    ...
  },
}

Usage

Open React > Quick Start from the menu bar for quick start wizard that will check requirements and create the React project next to the Assets folder.

Import the sample from Package Manager Window to see how the Canvas is set up. Note that the Source Asset property must point to the output file of your React project, which is Assets/Resources/react/index.js by default.

Make sure to read the wiki for further usage instructions. You should also check the sample projects.

Issues and Contribution

Please feel free to share all your questions, proposals and feedbacks by opening issues. This package is in its early stages and looking for constructive feedback.

Resources and References