| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
This is an experimental project integrating ReactJS with unity UIElements.
Add a dependency into your manifest.json.
{
"dependencies": {
"com.mkmarek.uielements.react": "https://github.com/mkmarek/unity-react-uielements.git#releases/vX.X.X",
}
}For released version numbers check the releases tab.
import React from 'react';
import { render } from 'unity-renderer';
const style = {
width: "80%",
height: "80%",
backgroundColor: "#ffffff",
fontSize: 21,
alignSelf: 'Center',
alignItems: 'Center',
justifyContent: 'Center'
}
function App() {
return <visualElement style={style}>
Hello Unity!
</visualElement>
}
render(<App />)Set the root property to your index.jsx. Just drag it from your Resources folder into the field.
For bigger example look into the examples folder.
Check the wiki for more information.
| Back | FazBrowse Home | New Git URL |