/** * @private */ internal override void _setArmature(Armature value) { if (_armature == value) { return; } _ik = null; List <Slot> oldSlots = null; List <Bone> oldBones = null; if (_armature != null) { oldSlots = GetSlots(); oldBones = GetBones(); _armature._removeBoneFromBoneList(this); } _armature = value; if (_armature != null) { _armature._addBoneToBoneList(this); } if (oldSlots != null) { foreach (var slot in oldSlots) { if (slot.parent == this) { slot._setArmature(_armature); } } } if (oldBones != null) { foreach (var bone in oldBones) { if (bone.parent == this) { bone._setArmature(_armature); } } } }