Hey there, first time posting.
We are using Dragonbones in Unity for all of our animations.
For our hero character, we want him to be able to swap his weapon sprite during runtime, but it seems to give errors when I try it:
front.armature.GetSlot("rapier").display = sprite;
"front" is the UnityArmatureComponent and "sprite" is the new sprite to put in this slot.
According to Google I had to Dispose the slots first, but this just leave me without anything.
I forgot the error:
NullReferenceException: Object reference not set to an instance of an object
DragonBones.UnitySlot._OnUpdateDisplay () (at Assets/DragonBones/Scripts/unity/UnitySlot.cs:139)
DragonBones.Slot._UpdateDisplay () (at Assets/DragonBones/Scripts/armature/Slot.cs:462)
DragonBones.Slot.Update (Int32 cacheFrameIndex) (at Assets/DragonBones/Scripts/armature/Slot.cs:726)
DragonBones.Slot.set_displayList (System.Collections.Generic.List`1 value) (at Assets/DragonBones/Scripts/armature/Slot.cs:1151)
DragonBones.Slot.set_display (System.Object value) (at Assets/DragonBones/Scripts/armature/Slot.cs:1307)