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

ARCoreExtension breaks app input detection inside UnityView

Open firstIssue opened this issue 2 years ago • 2 comments

Hey there, we are trying to combine react native and Unity while using ARCoreExtensions inside Unity for AR View. As soon as the ARCoreExtension iOS Helper kicks in, the app loses input detection completely. Even reloading through metro does not fix it. Testing with Unity standalone does not show this behaviour. Is there anything, that you can think of, that might cause this issue or can fix it?

firstIssue avatar Sep 29 '22 15:09 firstIssue

did you find this solution ? why input detection breaks?

ahmedyasindev avatar Dec 02 '23 15:12 ahmedyasindev

did you find this solution ? why input detection breaks?

When debugging with Xcode I was able to reveal, that different iOS window layers have been fighting with each other. Imagine something like a css z-index fight. It seems like a bug and if I remember correctly, we used something like a hacked react view style to reset the focus of the iOS wrapped window

    // If you wrap your UnityView inside a parent, please take care to set dimensions to it (with `flex:1` for example).
    // See the `Know issues` part in the README.
    <View style={{flex: 1}}>
      <UnityView
        // @ts-ignore
        ref={unityRef}
        style={{flex: 1}}
        onUnityMessage={result =>
          console.log('onUnityMessage', result.nativeEvent.message)
        }
      />
    </View>
  );

firstIssue avatar Dec 13 '23 07:12 firstIssue