unityApp.send() dosen't get invoked when json is passed after update from Redux store #199
-
So I have been trying to communicate with Unity webgl from my react app, using JSON. Here connect() is invoked when a button is clicked. But unityApp.send() doesn't get invoked when I use planet?.port while setting the port in JSON.stringify (There are no Debug.log() outputs from the webgl ). Strangely it gets invoked when raw port number (eg 7000) is passed and everything works normally.
I am stuck and am unable to figure out what the problem is. I am using Unity 2019 and react-unity-webgl 7.1.10 . |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
Hi. If I understand you correctly, the send method does not seem to get invoked when you optionally unwrap |
Beta Was this translation helpful? Give feedback.
Hi. If I understand you correctly, the send method does not seem to get invoked when you optionally unwrap
port
fromplanet
, but does work when you set theport
to a hard coded value? Can you console log and share both results ofjsonData
with me?