Using React-Native and Unity3D in the Same View
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?
Answer by eragon1452 · Mar 28, 2018 at 11:32 PM
Hey @nberktumer. I am trying to achieve a similar goal as you, but I don't even know how to import the game into a react native view as you have described above. It would be greatly appreciated if you could send me a link or refer me to the place where you learned to do so. Thanks!
Hello, I used the tutorial below. It's working fine but when you try to reload the view, the app crashes. I think someone solved that issue, you can find it in the comments but I didn't try it myself.
Here is the tutorial link.
Answer by nehalvNehal · Jan 24, 2020 at 08:44 AM
Bro try this one https://medium.com/codeexplorers/connecting-the-dots-between-react-native-and-unity-3d-using-gradle-67f93b92c254
I tired but i am not getting the result properly So try this if you get the result properly please tell me Thanks in Advance