- Edited
Animation
I using spin to create a new file: skeleton.atlas, skeleton.json,s keleton.png.
- Now I want to replace image(newskeleton.png) in code c++?
- If I create file skeleton.png .It is a sheet. It has to many same image.
Ex: in file skeleton.png have 1.png and 2.png. I only using 1.png in skeleton.json.
How i can run file skeleton with image 2.png ?(using c++)
If it create to 10 file skeletons. How many will loading file .png? Is it optimize memory?
Usually an atlas is used at runtime, explained in the second paragraph here:
http://esotericsoftware.com/spine-texture-packer
You can pack 2 atlases using images with the exact same names, then you could choose at runtime which to load.
You could use skins to pack all your images into a single atlas. Then you can easily change skins at runtime using Skeleton setSkin
. The texture packer supports grouping images so they appear on the same atlas page to reduce draw calls (described here).
At runtime when an atlas is loaded, all atlas page images are loaded. If you want to avoid loading them all at the same time, then use multiple atlases and only load the one you want to use.