react-native-unity
react-native-unity copied to clipboard
ARCoreExtension breaks app input detection inside UnityView
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?
did you find this solution ? why input detection breaks?
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>
);