This commit is contained in:
CroakFang
2022-09-28 21:22:15 +08:00
parent ff8c44ba0d
commit 08e5106209
2 changed files with 5 additions and 4 deletions
+4 -3
View File
@@ -173,6 +173,9 @@ public class UmaViewerBuilder : MonoBehaviour
int head_id; int head_id;
string head_costumeId; string head_costumeId;
int tailId = (int)charaData["tailModelId"]; int tailId = (int)charaData["tailModelId"];
if (id == 9006) tailId = -1;//The tailId of 9006 is 1, but the character has no tail
if (UI.isHeadFix && CurrentHead != null) if (UI.isHeadFix && CurrentHead != null)
{ {
head_id = CurrentHead.id; head_id = CurrentHead.id;
@@ -230,8 +233,6 @@ public class UmaViewerBuilder : MonoBehaviour
} }
if (tailId != 0) if (tailId != 0)
{ {
string tailName = $"tail{tailId.ToString().PadLeft(4, '0')}_00"; string tailName = $"tail{tailId.ToString().PadLeft(4, '0')}_00";
@@ -617,7 +618,7 @@ public class UmaViewerBuilder : MonoBehaviour
Type aType = asset.GetType(); Type aType = asset.GetType();
if (aType == typeof(AnimationClip)) if (aType == typeof(AnimationClip))
{ {
if (CurrentUMAContainer && CurrentUMAContainer.UmaAnimator) if (CurrentUMAContainer && CurrentUMAContainer.UmaAnimator && CurrentUMAContainer.UmaAnimator.runtimeAnimatorController)
{ {
LoadAnimation(asset as AnimationClip); LoadAnimation(asset as AnimationClip);
} }