Atlas Replacement for Spine

Hello everyone! Is it possible to swap the atlas in Spine at runtime? I don’t want to use set_skin; instead, I want to create 4-6 small atlases for my chest and swap them at runtime.

1 Like

My Spine works in the GUI

It should work. What heppened when you tested?

I tried to use gui.set_texture(), but nothing happened. I would like to take a perfectly configured Spine and change its visual appearance by substituting atlases.

Here’s what I’ve tried so far:

  • Using go.set(url_gui.textures) to pass the atlas name.
  • Utilizing the set_texture method.
  • Trying gui.set("texture0").

None of these approaches worked as expected. Any suggestions or ideas to overcome this issue would be greatly appreciated.

I tried

Created an atlas, grabbed the spine node, and attempted to replace its texture using a key:

go.property(“spine_gui”, msg.url())
go.property(“atlas_replace”, resource.atlas("/assets/images/icons/a_copy.atlas"))

function init(self)
go.set(self.spine_gui, “textures”, self.atlas_replace, { key = “gold_chest_atlas” })
msg.post(self.gui_url, const.START_MSG)
end

Hi i also have similar use case, for swapping weapon of characters.

Have you found any solution?

Thank you