Hi!
I'm trying to change the attachment color at runtime using the same logic I can do in Unity.
I'm using this code, but nothing happens. Am I doing something wrong here?
for (var slot in skeleton.slots){
if(slot.data.name.contains('Base-')){
var attachment = skeleton.getAttachment(slot.data.index, slot.data.name);
if(attachment == null) continue;
var regionAttachment = attachment as spine_core.RegionAttachment;
if(regionAttachment != null){
regionAttachment.color.setFromString('FF0000');
regionAttachment.updateOffset();
}
}
}
I also tried setting skeleton.color and methods like skeleton.setToSetupPose(); but no luck.
Hi!
I'm trying to change the attachment color at runtime using the same logic I can do in Unity.
I'm using this code, but nothing happens. Am I doing something wrong here?
I also tried setting
skeleton.colorand methods likeskeleton.setToSetupPose();but no luck.