azesmway / react-native-unity-play

Play an unity view in react native
MIT License
40 stars 16 forks source link

The specified child already has a parent. You must call removeView() on the child's parent first. #17

Open nnrohu opened 2 years ago

nnrohu commented 2 years ago

I am trying to quit UnityView and go back to react-native screen.

nnrohu commented 2 years ago

I think the issue is here

 if (unityPlayer.getParent() != null) {
            ((ViewGroup) unityPlayer.getParent()).removeView(unityPlayer);
        }