Can i call a function which i created in unity from my React js app. #540
-
i want to call the sendToUnity function while one parameter is it possible to do from react web app unity code in bridge file : - SendtoJS(messageToSend); // Send the message to JavaScript if in WebGL build and not in Unity Editor
} i want to call this sendToUnity function with one parameter is it possible to do. from unity app react code i don't know what else to add in the question to give more context. please help me with this am i doing it right or there is any other way possible what i need |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hello, indeed, it is possible to achieve this by utilizing the |
Beta Was this translation helpful? Give feedback.
Hello, indeed, it is possible to achieve this by utilizing the
SendMessage
function provided by the Unity Context hook. Additional examples and detailed explanations are available in the documentation.https://react-unity-webgl.dev/docs/api/send-message