Spine Game Objects can be created via the Game Object Factory, Game Object Creator, or directly. You can only create them if the Spine plugin has been loaded into Phaser.
Maybe you haven’t loaded the Spine plugin into Phaser.
Here an example: Phaser 3 Examples
Thanks. I managed to figure it out and it is imported as you mentioned.
The only thing I don’t get is, why can’t we import the SpinePlugin directly from node module like importing this SpineGameObject?
When I try to import SpinePlugin in directly from node module, I get an error at
var Spine = require(‘Spine’); in SpinePlugin.js
Currently, the only way for Spine to work is to load the build SpinePlugin file, either the minified or non-minified version.
I wish I can just import directly from node module without needing the build Spine files, unless this plugin works differently and need to load a build file?
Thanks, adding that seems to fix the build issue; but, when running it, it crashes. Spine.webgl.SceneRenderer is not define. Perhaps I am not suppose to import the SpinePlugin.js from src but have to import SpinePlugin.js src from dist?
Using the SpinePlugin.js src from dist works fine though. Everything runs as expected (without even need to add the alias)