You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using UnityView with react-navigation stack, the first time the stack screen is mounted UnityView load correctly. If then you go to another screen and go back to the Unity one the UnityVieew component doesn't get rendered. I saw a similar issue here: #15 and so i set the prop androidKeepPlayerMounted?: boolean to true. That solved the issue, but caused another one: when from unity screen you go back to a previous screen and after that you return to the unity screen i got the following error:
The specified child already has a parent. You must call removeView() on the child's parent first. addViewInner (ViewGroup.java) addView (ViewGroup.java) addUnityViewToGroup (ReactNativeUnity.java) ...
Any idea how to solve this?
The text was updated successfully, but these errors were encountered:
Hi, there! So, I investigate the problem, and i found that the lib call a routine that "clear" unity after unmount event. So i forked this lib and remove this. Another point, I added a listener to detect that a screen lost the focus and unmount the components that have unity view embedded. So, now works, I have several screens that have unity view, and i can navigate between them.
Using UnityView with react-navigation stack, the first time the stack screen is mounted UnityView load correctly. If then you go to another screen and go back to the Unity one the UnityVieew component doesn't get rendered. I saw a similar issue here: #15 and so i set the prop
androidKeepPlayerMounted?: boolean
to true. That solved the issue, but caused another one: when from unity screen you go back to a previous screen and after that you return to the unity screen i got the following error:The specified child already has a parent. You must call removeView() on the child's parent first. addViewInner (ViewGroup.java) addView (ViewGroup.java) addUnityViewToGroup (ReactNativeUnity.java) ...
Any idea how to solve this?
The text was updated successfully, but these errors were encountered: