Dynamic atlas change?

You can modify/change the contents of an existing atlas at runtime. BUT for this to be useful you also need to know which part of the atlas to change. So you either have to hardcode this or also include the original .atlas file as a custom resource and load and parse it to know the location within the atlas.

I believe @Pkeod created an example of how to do this for a sprite. The principle is the same for the atlas used by a Spine model.

Here’s one forum thread and a solution by @Pkeod : Dynamic creation of the atlas in the script - #26 by Pkeod (there are probably more threads discussing this)

If you can settle for less than infinite then there’s also the spine skin functionality (spine.set_skin()) where you can change the image used by one part of a model.

2 Likes