This project is a student project for Centrale Supelec. Its purpose is to add Augmented Reality in cimeteries.
- Set up your environement with react-native-cli
- Node version >= 14
- Unity version >= 2019.4
- Git and Git LFS 2.x
- Once you've cloned the repository, don't forget to run
git submodule init
and thengit submodule update
to get the files of our Unity project - If not already installed, you will need Github for Unity
- You might want to have a look to how submodules work in git
The git submodule with our Unity project has already been configured so the steps below should not be needed. But the whole procedure is explained here in case you want to give it a try with your own unity project.
To configure Unity to add the exported files somewhere accessible to your app we use some build scripts. And the default configuration expects that you place your Unity Project in the following position relative to our app.
.
├── android
├── ios
├── unity
│ └── <Your Unity Project>
├── node_modules
├── package.json
└── README.md
Copy files in the /template
folder in /unity/<Your Unity Project>/Assets/Editor/ReactNative/
.
- Open your Unity Project
- Go to Player settings (File => Build Settings => Player Settings)
- Change
Product Name
to the name of the Xcode project which is inios/${XcodeProjectName}.xcodeproj
Under Player settings > Android > Other Settings
make sure Scripting Backend
is set to IL2CPP
, ARM64
is checked under Target Architectures
, and that Auto Graphics API
is unchecked (with OpenGLES3
and OpenGLES2
in the list in that order).
Under Player settings > iOS > Other Settings
make sure Auto Graphics API
is checked.
Now you should be able to export the Unity Project using ReactNative => Export Android
or ReactNative => Export IOS
.
The exported artifacts will be placed in a folder called UnityExport
inside either the /android
or the /ios
folder.
Don't forget to export your Unity project each time you make changes, if you want to see it in React Native.
- Unity integration hasn't been tested yet on iOS.
- Android emulation only works with ARM
Please see react-native-unity-view repository.
- On android device:
npm run android
- On iOS device:
npm run ios
In this section you can find all links towards our documentation pages