f111fei / react-native-unity-demo

103 stars 80 forks source link

Undefined symbols for architecture arm64: "_onUnityMessage", referenced from: #11

Closed Frulko closed 5 years ago

Frulko commented 6 years ago

Hi, first I want to say thank you for this react-native plugin ! It could be a best plugin to combine react-native & Unity

I have a problem with the installation of your demo. First I had this issue : https://github.com/f111fei/react-native-unity-demo/issues/2 It solve my first problem but a second has arrived.

Undefined symbols for architecture arm64: "_onUnityMessage", referenced from:

I'm on Unity 2017.2.0f3 & XCode 9.3

Have you an idea ? Thanks a lot !

f111fei commented 6 years ago

https://github.com/f111fei/react-native-unity-demo/issues/10#issuecomment-393413062

And copy UnityMessageManager.cs to your unity project

Frulko commented 6 years ago

Thanks for your reply. I just do that but the issue still here.

screen shot 2018-06-06 at 09 21 01

I clean up the project, remove reference in XCode, remove folder, Export iOS from Unity, clean product in XCode.

vpsantos commented 6 years ago

I just updated my Unity to 2018.1.1f1 and now I have the same problem Frulko, it was working for an older version.

Any idea f111fei?

f111fei commented 6 years ago

I think UnityMessageManager is bad.

Try to delete UnityMessageManager from unity project.

And build again.

vpsantos commented 6 years ago

Unfortunately not, could you please try to run the demo on Unity 2018.1.1f1?

f111fei commented 6 years ago

@vpsantos https://github.com/f111fei/react-native-unity-demo/commit/629b2790b448f44c723fd347d37aea617d40739a

I am using 2018.1.3f1.

vpsantos commented 6 years ago

Ok, I will update my Unity again, but is the message working for you on iOS?

Frulko commented 6 years ago

Hi, i found maybe a solution.

I unlink and link the react-native plugin and it solve my issue

edamazzio commented 6 years ago

@Frulko I have the same issue. Do you mean to run react-native unlink react-native-unity-view and then react-native link react-native-unity-view ?

Frulko commented 6 years ago

yes this is what I've done.

JanOwiesniak commented 5 years ago

@Frulko I have the same issue. Do you mean to run react-native unlink react-native-unity-view and then react-native link react-native-unity-view ?

Relinking solved the problem for me.

shariq93 commented 3 years ago

I resolved this issue by installing the library first and then reimport the project from unity.

scottthoo commented 2 years ago

I resolved this issue by installing the library first and then reimport the project from unity.

Hi @shariq93, can you explain more in detail?

shariq93 commented 2 years ago

@scottthoo yes my issue is also reolved thanks

Tommy-Elliott commented 1 year ago

I resolved this issue by changing my script code to reference the UnityMessageManager via a private property on the class (private UnityMessageManager MessageManager { get; set; }), populated in Start method, via MessageManager = GetComponent<UnityMessageManager>(); instead of what it was using when I got this error: UnityMessageManager.Instance. I'm pretty sure the place it couldn't handle the latter is within the handler function I attached to the ARSession.stateChanged event, because the other places I used UnityMessageManager.Instance tested fine on iPhone before I added the handler that used it.