Unity 2020.3.2f1 Doesn't recieve messages from react #174
Unanswered
SpadaccinoIgnorante
asked this question in
Help Wanted!
Replies: 1 comment 8 replies
-
Hi! Is your |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
i am using your react library to interact with my unity application, but also with a simple test is not working, i suppose is a compatibility issue.
this is the line of code to send the message to unity : unityContent.send(“MyObject”,”TestMethod”,true);
of course in unity there is a gameobject called “MyObject” and a script with a public method called TestMethod(bool value);
The react library version is the latest (8.3.1) and i can see the page with my application, but i cannot interact it trough react.
// React code
unityContent.send("MyObject","TestMethod",true);
C# Code
public class TestReact : MonoBehaviour { public void TestMethod(bool test) { Debug.Log($"Test message {test}"); Camera.main.backgroundColor = Color.blue; } }
Beta Was this translation helpful? Give feedback.
All reactions