소스 검색

[phaser] Closes #2390, reset static gameWebGLRenderer to remounts in React/Vue work.

Mario Zechner 1 년 전
부모
커밋
8d4ed3056a
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      spine-ts/spine-phaser/src/SpinePlugin.ts

+ 1 - 0
spine-ts/spine-phaser/src/SpinePlugin.ts

@@ -193,6 +193,7 @@ export class SpinePlugin extends Phaser.Plugins.ScenePlugin {
 	gameDestroy () {
 		this.pluginManager.removeGameObject((window as any).SPINE_GAME_OBJECT_TYPE ? (window as any).SPINE_GAME_OBJECT_TYPE : SPINE_GAME_OBJECT_TYPE, true, true);
 		if (this.webGLRenderer) this.webGLRenderer.dispose();
+		SpinePlugin.gameWebGLRenderer = null;
 	}
 
 	/** Returns the TextureAtlas instance for the given key */