Skip to content

SendMessage Within AddListener #409

Jul 12, 2022 · 2 comments · 5 replies
Discussion options

You must be logged in to vote

The problem was that I was registering my listeners before the Unity element was loaded. To fix this, I moved useUnityContext to the component that was building the Unity game. I then added isLoaded as a dependency for the useEffect hook. I also wait to register the listeners until isLoaded is true.

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
3 replies
@i-jared
Comment options

@i-jared
Comment options

@i-jared
Comment options

Comment options

You must be logged in to vote
2 replies
@claretb
Comment options

@i-jared
Comment options

Answer selected by i-jared
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants