Add Unity3D to React-Native

I'm trying to put the Unity3D game into my react-native (for now, only android). So far, I could only navigate to the game that is in another view from react-native. However, I want to show the game at the background of some react-native buttons. So, I need to convert UnityView into React-Native component (like ). The problem is if I don't set setContentView() to UnityView, Unity3D game doesn't show up. To use react-native, I must set setContentView() to ReactNative view. So, only one of them can be shown in a view. Is there any solution to this problem?

Here are a few tutorials on this that you can get started;

  • https://the-nerd.be/2015/11/13/integrate-unity-5-in-a-native-ios-app-with-xcode-7/
  • https://github.com/keyv/iOSUnityVuforiaGuide
  • http://www.geekyhamster.com/2013/12/unityplayer-as-subview-with-transparent.html
  • https://bitbucket.org/jack_loverde/unity-5-vuforia-6-and-ios-native-integration
  • http://www.makethegame.net/unity/add-unity3d-to-native-ios-app-with-unity-5-and-vuforia-4-x/

Once you get a Unity view working. Then you can build your own custom React Native component with it. React Native has tutorials on how to make your own custom components/views.

Comments

Popular posts from this blog

Meaning of `{}` for return expression

Get current scroll position of ScrollView in React Native

flutter websocket connection issue