Skip to content

Commit

Permalink
Merge pull request EsotericSoftware#450 from Fenrisul/master
Browse files Browse the repository at this point in the history
[Unity] BoundingBoxFollower reset fix
  • Loading branch information
Fenrisul committed Jul 18, 2015
2 parents c31b2e4 + 2f31288 commit 457cd46
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions spine-unity/Assets/spine-unity/BoundingBoxFollower.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public Slot Slot {
}
}


void OnEnable () {
ClearColliders();

Expand All @@ -90,6 +90,9 @@ void OnEnable () {
if (skeletonRenderer != null) {
skeletonRenderer.OnReset -= HandleReset;
skeletonRenderer.OnReset += HandleReset;

if (hasReset)
HandleReset(skeletonRenderer);
}
}

Expand All @@ -116,7 +119,7 @@ public void HandleReset (SkeletonRenderer renderer) {
skeletonRenderer.Reset();
skeletonRenderer.OnReset += HandleReset;
}


var skeleton = skeletonRenderer.skeleton;
slot = skeleton.FindSlot(slotName);
Expand Down

0 comments on commit 457cd46

Please sign in to comment.