I have a working Unity WebGL application integrated with Vue3. Every time I move to a different page, there is always an error:
I tried to call unityInstace.Quit()
during onUnmount event in Vue3, and the error changes to:
I suspect there is an issue on destroying the unity instance. However, I looked at Unity WebGL docs, and there doesn't seems to be any guides on disposing the Unity WebGL instance.
Thanks!
CodePudding user response:
Inspired by the link shared by @TCM in the comment, now I am using iframe in the component.
Ref: How do I clean up and unload a Unity WebGL canvas when changing page