Spine plugin error

Hi, I’m a freshman with playcanvas, I download the spine plugin project file form github and try to assemble it in my new project.

But I when I launch it in browser, I got this error message:
[spine.js?id=6039633:20]: Cannot set property ‘priority’ of null

TypeError: Cannot set property ‘priority’ of null
at script.Spine.initialize (https://playcanvas.com/api/assets/files/scripts/spine.js?id=6039633:20:46)
at Func._scriptMethod (https://code.playcanvas.com/playcanvas-stable.js:20745:21)
at Func._onInitialize (https://code.playcanvas.com/playcanvas-stable.js:20762:16)
at Func._callComponentMethod (https://code.playcanvas.com/playcanvas-stable.js:20661:32)
at Func._onInitialize (https://code.playcanvas.com/playcanvas-stable.js:20667:10)
at Function.fire (https://code.playcanvas.com/playcanvas-stable.js:563:37)
at Function.initialize (https://code.playcanvas.com/playcanvas-stable.js:18784:21)
at Application.start (https://code.playcanvas.com/playcanvas-stable.js:18356:24)
at https://playcanvas.com/editor/scene/js/launch.js:6558:25
at Application._preloadScripts (https://code.playcanvas.com/playcanvas-stable.js:18219:7)

How can I get rid of this error?

So it’s failing on this line of the spine.js script:

            this.entity.spine.spine.priority = this.priority;

It’s saying that this.entity.spine.spine is null. Without being able to run your project, it’s hard to tell why. I would recommend you post a link to a reproducible test case when posting these kinds of questions.

Thanks, and here is the project link.
https://playcanvas.com/project/445690/overview/spinetest

Hi,

It looks like you haven’t set the texture on the spine script. Add goblin-ffd.png to the texture attribute.