asmadsen / react-native-unity-view

MIT License
204 stars 128 forks source link

How do I send a JSON from unity? #54

Open clearly-outsane opened 3 years ago

clearly-outsane commented 3 years ago

I'm sorry but there doesn't seem to be a clear explanation to this on the README

UnityMessageManager.Instance.SendMessageToRN(new UnityMessage() { name = "click", callBack = (data) => { Debug.Log("onClickCallBack:" + data); } });

When i do this from unity, nothing happens on the react native side, the function passed to onUnityMessage doesnt get triggered