mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
[unity] BoundingBoxFollower also uses active skin.
This commit is contained in:
parent
dac38e5843
commit
263c6278e2
@ -112,7 +112,24 @@ namespace Spine.Unity {
|
||||
}
|
||||
|
||||
if (this.gameObject.activeInHierarchy) {
|
||||
foreach (var skin in skeleton.Data.Skins) {
|
||||
foreach (var skin in skeleton.Data.Skins)
|
||||
AddSkin(skin, skeleton, slotIndex);
|
||||
|
||||
AddSkin(skeleton.skin, skeleton, slotIndex);
|
||||
}
|
||||
|
||||
if (BoundingBoxFollower.DebugMessages) {
|
||||
bool valid = colliderTable.Count != 0;
|
||||
if (!valid) {
|
||||
if (this.gameObject.activeInHierarchy)
|
||||
Debug.LogWarning("Bounding Box Follower not valid! Slot [" + slotName + "] does not contain any Bounding Box Attachments!");
|
||||
else
|
||||
Debug.LogWarning("Bounding Box Follower tried to rebuild as a prefab.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void AddSkin (Skin skin, Skeleton skeleton, int slotIndex) {
|
||||
var attachmentNames = new List<string>();
|
||||
skin.FindNamesForSlot(slotIndex, attachmentNames);
|
||||
|
||||
@ -133,18 +150,6 @@ namespace Spine.Unity {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (BoundingBoxFollower.DebugMessages) {
|
||||
bool valid = colliderTable.Count != 0;
|
||||
if (!valid) {
|
||||
if (this.gameObject.activeInHierarchy)
|
||||
Debug.LogWarning("Bounding Box Follower not valid! Slot [" + slotName + "] does not contain any Bounding Box Attachments!");
|
||||
else
|
||||
Debug.LogWarning("Bounding Box Follower tried to rebuild as a prefab.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void OnDisable () {
|
||||
if (clearStateOnDisable)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user