Question - Dragonbones - swap atlas during runtime possible?

Question - Dragonbones - swap atlas during runtime possible?
0.0 0

#1

Basically I managed to create two db atlases and import them to cocos as follows:

  1. import dragonbones asset to cocos creator
  2. Navigate to it’s folder (r click>open in explorer)
  3. copy and paste the YourAsset_tex.json file and YourAsset.png file - so they have a duplicate each
  4. Open the new copy - NewYourAsset_tex.json file and change the line that points to the original texture:
    YourAsset.png --> NewYourAsset.png
  5. Edit the new duplicate of the atlas image (NewYourAsset.png) - change the hue or scribble ontop for test
  6. Back in cocos creator, drag and drop NewYourAsset_tex resource ontop of the dragonbones-atlas box, to replace the original one

The editor will not update it with the new one, until you save and restart. However if you run the game - you will see that the new atlas works and now you have two functional atlases in your cocos creator project.

Now my question is -
how do I swap them during runtime via script? I couldn’t find any example code of that anywhere.
Help much appreciated


#2

So basically nobody here knows how to swap an atlas during runtime?
:slight_smile:

Btw the dragonbones demo example is way too complicated and does not show skinned meshes at all