Open bilal-arikan opened 4 years ago
hi @bilal-arikan, would you be willing to expand on your solution? I'm currently unable to get Xcode to compile the project due to this error which seems to be related:
/tmp/myproject/node_modules/@asmadsen/react-native-unity-view/ios/RNUnityViewManager.m:19:29: error: no visible @interface for 'UnityAppController' declares the selector 'setUnityMessageHandler:'
[GetAppController() setUnityMessageHandler: ^(const char* message) {
~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~
Any suggestions would be much appreciated!
Hi @bilal-arikan, may i ask if your messaging is working after the unity is unload and loaded again??
Im also having a problem with the MessageHandler from react native to unity.
The scenario is : First open of unity view is perfectly working ( Message Handler for both side) 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.
Does anyone know how to fix this problem?
HELP PLEASE!! Thanks!
Hi, I recently encountered this error,
reason of the problem At RNUnityViewManager.m,
Doesn't run
else
section.on UnityView.mm
been calling
_isUnityReady = YES
beforeView
method in this fileCurrently for those who may encounter this error, If you create
<UnityView>
before callUnityModule.createUnity()
,onUnityMessage
works without any problems