Home > Mobile >  Error when destroying unity webgl instance on Vue3
Error when destroying unity webgl instance on Vue3

Time:06-20

I have a working Unity WebGL application integrated with Vue3. Every time I move to a different page, there is always an error: enter image description here

I tried to call unityInstace.Quit() during onUnmount event in Vue3, and the error changes to: enter image description here

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

  • Related