** First methods**
this.load.plugin(
/*key: */ 'SpinePlugin',
/*url: */ './plugins/SpinePlugin.js',
/*start: */ true,
/*mapping: */ 'spine'
);
this.load.setPath('assets/demo/spine');
this.load.spine('boy', 'spineboy-pro.json', 'spineboy-pro.atlas', true);
this method throws error: Uncaught TypeError: this.load.spine is not a function
** Second methods**
scene: {
preload: preload,
create: create,
pack: {
files: [
{ type: 'scenePlugin', key: 'SpinePlugin', url: 'plugins/SpinePlugin.js', sceneKey: 'spine' }
]
}
}
this method throws error too: Uncaught TypeError: this.load.spine is not a function
.
While this one works well.
plugins: {
scene: [
{ key: 'SpinePlugin', plugin: window.SpinePlugin, mapping: 'spine' }
]
}
My Phaser version is 3.22.0.
Should I give some file loader event listen, then use this.load.spine
after the event emits?