Communication From Unity on Quitted Fails
See original GitHub issueI tried to invoke a function inside React after Unity has quitted, but it doesn’t seem to trigger the function.
In my console, it correctly logs that the application has quitted.
However, the function or the console.log() specified in the callback never gets triggered.
constructor(props) {
super(props);
// Next up create a new Unity Content object to
// initialise and define your WebGL build. The
// paths are relative from your index file.
this.unityContent = new UnityContent(
"/Blocks/Build.json",
"/Blocks/UnityLoader.js"
);
// this.unityContent.on("finishBlocksFromUnity", () => {
// this.props.toNewWords();
// });
this.unityContent.on("quitted", () => {
// Now we can for example go back to another page
console.log("Log quitted")
this.props.toNewWords();
});
}
The Unity application gets quitted with Application.Quit();
.
Did I miss something?
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Communication From Unity on Quitted Fails · Issue #69
I tried to invoke a function inside React after Unity has quitted, but it doesn't seem to trigger the function.
Read more >Unity locks up, can't force quit, must restart often.
Same problem for me when hit play unity stuck and cannot closed by force quit. I have to restart. Version 2019.3.2f1. How can...
Read more >Should YOU QUIT Unity FOREVER? - YouTube
We'll look at the most recent Unity news and decide whether to stay with Unity. Looking to the future, all the controversy and...
Read more >Communicating with Events in Unity - YouTube
Check out the Course: https://bit.ly/3i7lLtH-------Use Events or a PubSub model to communicate between gameobjects that have no reference to ...
Read more >DiRT restore quitted.
I ran DbWalker v4.0.17 on the Japanese Win2K box without error and DiRT backup v1.0.115 to copy Unity configuration into the 3rd box....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sounds good. That is what I ended up doing and all is working well. Thanks for the tip.
This issue was closed because it has been inactive for 30 days since being marked as stale.