I am still new to Defold, so this is more a theory discussion than a practical one at this point. I have searched the forums and have found a few discussions on the concept of making characters with variable attributes or accessories. From what I understand you can’t swap frames or sprites on the individual elements baked into the spine. What I am unclear on is if either of these 2 options would work or if this would cause performance issues.
Option 1 - Animate everything and hide
Is is possible to hide individual sprites in the spine. For example, if I animated a character with 15 different helmets, 15 swords, 15 armor, 5 different faces, etc and then at runtime hid all but the ones the user selected? How bad would this wreck performance to have unused/invisible sprites and is this even possible?
Option 2 - Parent at runtime
Could a spine be set to be mostly null graphics (or the full texture set to transparent) and then the ‘pieces’ be parented to the bones as game objects at runtime? For example, if the back to front order of the character was as follows…
left arm, left leg, body, head, right arm, right leg
If at runtime I parented the chosen graphics and accessories to those bones, would it be possible to keep the depth order correctly stacked but then use variable game objects or frames of an animation to pick the correct pieces?
Just trying to work out the best way to do this before I get too deep into animating in case this drastically changes my structure from spine or dragon bones.
Thanks.