react-native-unity-view
react-native-unity-view copied to clipboard
iOS : Black screen with multiple pages
Hi everyone,
We're experencing some issues trying to start two different scenes on two different pages. We have three scenes : One that communicates with react-native to choose whoch scene to launch, and two scenes (we never switch between the two scenes). We can start one scene as many times as we want, we can also switch from one scene to the other if we're staying on the same react-native page, but when we try to load one scene on one page then the other one on another page, we're getting a black screen on iOS (works fine on Android). We know the scene is loading fine (we have sound and logs to prove it), but nothing is displayed. Any idea why?
Ps: Xcode 10.1, [email protected], [email protected], [email protected], Unity 2018.2.19f1
Thanks,
I have the same issue, does anyone know how to fix it?
Looks a lot like #82 or #87 but neither fixes did the trick.
The view looks like this :
render() {
const { renderUnity } = this.state;
return (
<View style={styles.container}>
{renderUnity && (
<React.Fragment>
<UnityView
ref={ref => {
this.unity = ref;
}}
style={{
position: 'absolute',
left: 0,
right: 0,
top: 1,
bottom: 1,
}}
onMessage={this.onUnityMessage}
/>
</React.Fragment>
)}
</View>
);
}
}
@f111fei any idea?
I don't know if this can help someone, but the issue seemed to come from having the view launched one time in landscape and once in portrait.