-
-
Notifications
You must be signed in to change notification settings - Fork 170
Closed
Labels
Description
I 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?