How do I call the 'sendMessage' function OUTSIDE of a react component? #448
Unanswered
LUK3ARK
asked this question in
Help Wanted!
Replies: 1 comment 1 reply
-
I couldn't do sendMessage on the component, so I got it from the component through global state management like Redux and sentMessage on the page with unityprovider. |
Beta Was this translation helpful? Give feedback.
1 reply
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.
-
Hello, I am currently trying to create a standalone function that when called by unity, automatically returns a value via the sendMessage function. I have been able to create this inside of a component, however I can only call a function from the unity side.
I might be overlooking something really easy, but how can I expose the sendMessage function outside of the component and into pure Javascript? Bear in mind that this function is provided by a hook.
Beta Was this translation helpful? Give feedback.
All reactions