React Native + Unity3D Demo. Supports iOS and Android both.
Requirements: Android Studio 3.4.2+ Unity version 2019.3.0b4+
- Run Unity3D and build project for iOS into "unity/build/ios" folder.
- Run command "yarn install".
- Run command "pod install" in ios folder.
- Open ios workspace.
- Import Unity-iPhone project into workspece.
- Change "Unity-iPhone>Data" Target membership to "UnityFramework".
- Run Unity3D and build (* with Export Project option) project for Android into "unity/build/android" folder.
- Run command "yarn install".
- Open Android Studio and import the unity3D project into Android Studio.
- Append the following lines to
android/settings.gradle
:
...
include ':unityLibrary'
project(':unityLibrary').projectDir=new File('..\\unity\\build\\android\\unityLibrary')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:
implementation project(':unityLibrary')
implementation files("${project(':unityLibrary').projectDir}/libs/unity-classes.jar")