react-native-unity-view icon indicating copy to clipboard operation
react-native-unity-view copied to clipboard

iOS : Black screen with multiple pages

Open Arnaod opened this issue 5 years ago • 3 comments

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,

Arnaod avatar Mar 19 '19 13:03 Arnaod

I have the same issue, does anyone know how to fix it?

thingthing avatar Mar 27 '19 12:03 thingthing

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?

Arnaod avatar Apr 08 '19 14:04 Arnaod

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.

Arnaod avatar Apr 25 '19 09:04 Arnaod