Callback Listener in Unity - How to call script file method from UnityPlayerActivity in Android

后端 未结 2 470
滥情空心
滥情空心 2020-12-29 22:08

I have an android library project and imported the library project in the Unity project. Now, I want to implement a callback in Unity project, which will execute according t

2条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-29 22:40

    I believe you are only allowed to call UnitySendMessage() from the main thread - at least in one scenario above you are calling it from the Android UI worker thread.

    As a quick sanity test, try calling it before you right at the top of your shareText() function.

提交回复
热议问题