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
I'm running into an issue where when I refresh the Metro server, UnityView's onUnityMessage and onMessage handlers stop receiving messages dispatched by Unity. Issue is occurring with iOS build to physical device.
I've tried adding event listeners manually, but still a no-go.
The message is being dispatched by Unity with the following implementation:
However, after Metro is refreshed, I can still see the Debug.Log's output to Xcode which tells me that SendMessageToRN should be invoking but React Native is unable to receive the messages after a single refresh.
The text was updated successfully, but these errors were encountered:
For anyone running into the same issue, a work-around for this is not to refresh using Metro, but simply closing and re-opening the application on the device. It's the equivalent of refreshing the Metro server.
Hi, Im experiencing nearly the same situation but for my side i dont want to close the app since its not necessary.
The scenario is :
First open of unity view is perfectly working.
then I used ** Application.Unload(); ** to unload unity and navigate to other react native screen,
When navigate again to unity view, Unity will reload just fine and will work properly,
But the problem is that messaging is distorted. Unity still can send message and will be receive in react native side, But for react native part when attempt to send message to unity view. Unity will not be able to receive the message.
Im suspecting that react native still trying to send message from the previous view that has been unload.
@asmadsen
I'm running into an issue where when I refresh the Metro server, UnityView's
onUnityMessage
andonMessage
handlers stop receiving messages dispatched by Unity. Issue is occurring with iOS build to physical device.I've tried adding event listeners manually, but still a no-go.
The message is being dispatched by Unity with the following implementation:
However, after Metro is refreshed, I can still see the Debug.Log's output to Xcode which tells me that
SendMessageToRN
should be invoking but React Native is unable to receive the messages after a single refresh.The text was updated successfully, but these errors were encountered: