|
@@ -57,7 +57,7 @@ namespace Spine.Unity {
|
|
BoundingBoxAttachment currentAttachment;
|
|
BoundingBoxAttachment currentAttachment;
|
|
string currentAttachmentName;
|
|
string currentAttachmentName;
|
|
PolygonCollider2D currentCollider;
|
|
PolygonCollider2D currentCollider;
|
|
-
|
|
|
|
|
|
+ bool skinBoneEnabled = true;
|
|
public readonly Dictionary<BoundingBoxAttachment, PolygonCollider2D> colliderTable = new Dictionary<BoundingBoxAttachment, PolygonCollider2D>();
|
|
public readonly Dictionary<BoundingBoxAttachment, PolygonCollider2D> colliderTable = new Dictionary<BoundingBoxAttachment, PolygonCollider2D>();
|
|
public readonly Dictionary<BoundingBoxAttachment, string> nameTable = new Dictionary<BoundingBoxAttachment, string>();
|
|
public readonly Dictionary<BoundingBoxAttachment, string> nameTable = new Dictionary<BoundingBoxAttachment, string>();
|
|
|
|
|
|
@@ -132,6 +132,7 @@ namespace Spine.Unity {
|
|
AddCollidersForSkin(skeleton.Skin, slotIndex, colliders, ref requiredCollidersCount);
|
|
AddCollidersForSkin(skeleton.Skin, slotIndex, colliders, ref requiredCollidersCount);
|
|
}
|
|
}
|
|
DisposeExcessCollidersAfter(requiredCollidersCount);
|
|
DisposeExcessCollidersAfter(requiredCollidersCount);
|
|
|
|
+ skinBoneEnabled = slot.Bone.Active;
|
|
|
|
|
|
if (BoundingBoxFollower.DebugMessages) {
|
|
if (BoundingBoxFollower.DebugMessages) {
|
|
bool valid = colliderTable.Count != 0;
|
|
bool valid = colliderTable.Count != 0;
|
|
@@ -210,8 +211,10 @@ namespace Spine.Unity {
|
|
}
|
|
}
|
|
|
|
|
|
void LateUpdate () {
|
|
void LateUpdate () {
|
|
- if (slot != null && slot.Attachment != currentAttachment)
|
|
|
|
|
|
+ if (slot != null && (slot.Attachment != currentAttachment || skinBoneEnabled != slot.Bone.Active)) {
|
|
|
|
+ skinBoneEnabled = slot.Bone.Active;
|
|
MatchAttachment(slot.Attachment);
|
|
MatchAttachment(slot.Attachment);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>Sets the current collider to match attachment.</summary>
|
|
/// <summary>Sets the current collider to match attachment.</summary>
|
|
@@ -225,7 +228,7 @@ namespace Spine.Unity {
|
|
if (currentCollider != null)
|
|
if (currentCollider != null)
|
|
currentCollider.enabled = false;
|
|
currentCollider.enabled = false;
|
|
|
|
|
|
- if (bbAttachment == null) {
|
|
|
|
|
|
+ if (bbAttachment == null || !skinBoneEnabled) {
|
|
currentCollider = null;
|
|
currentCollider = null;
|
|
currentAttachment = null;
|
|
currentAttachment = null;
|
|
currentAttachmentName = null;
|
|
currentAttachmentName = null;
|