The new SpineGameObject should use the gameObject's scene ref, not the system scene (#2357)

This commit is contained in:
spayton 2023-09-05 21:30:54 +01:00 committed by GitHub
parent 31e346e84a
commit f80bc5e110
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -124,7 +124,7 @@ export class SpinePlugin extends Phaser.Plugins.ScenePlugin {
let self = this;
let addSpineGameObject = function (this: Phaser.GameObjects.GameObjectFactory, x: number, y: number, dataKey: string, atlasKey: string, boundsProvider: SpineGameObjectBoundsProvider) {
let gameObject = new SpineGameObject(scene, self, x, y, dataKey, atlasKey, boundsProvider);
let gameObject = new SpineGameObject(this.scene, self, x, y, dataKey, atlasKey, boundsProvider);
this.displayList.add(gameObject);
this.updateList.add(gameObject);
return gameObject;