[Vuejs]-Nuxt (vue) and Unity's Unityloader memory leak

0👍

I’ve finally found a solution to this issue.

Reflective bug: Unity WebGL continues to run after content is removed

I’ve added the bellow to the unity.vue to the package.

beforeDestroy() {
        if(this.gameInstance && this.gameInstance.Quit){
            this.gameInstance.Quit();
        }
    },

In the mean time, if you want a now solution, and don’t want to upgrade to an unstable version. You can pull out the Unity.vue file from the package, and edit it to be wrapped in an Iframe and dispose of the iframe when un-mounting.

Leave a comment