From a2b9b817ce8e01b5ac39f8d768487db398ed0f16 Mon Sep 17 00:00:00 2001 From: nekobako Date: Mon, 26 Aug 2024 10:04:14 +0900 Subject: [PATCH] fix: MaterialSetter is not working without ShapeChanger or ObjectToggle (#1043) --- .../AnimationGeneration/ReactiveObjectPrepass.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Editor/ReactiveObjects/AnimationGeneration/ReactiveObjectPrepass.cs b/Editor/ReactiveObjects/AnimationGeneration/ReactiveObjectPrepass.cs index d6326afc..37e0de57 100644 --- a/Editor/ReactiveObjects/AnimationGeneration/ReactiveObjectPrepass.cs +++ b/Editor/ReactiveObjects/AnimationGeneration/ReactiveObjectPrepass.cs @@ -17,7 +17,9 @@ namespace nadena.dev.modular_avatar.core.editor var hasShapeChanger = context.AvatarRootObject.GetComponentInChildren() != null; var hasObjectSwitcher = context.AvatarRootObject.GetComponentInChildren() != null; - if (hasShapeChanger || hasObjectSwitcher) + var hasMaterialSetter = + context.AvatarRootObject.GetComponentInChildren() != null; + if (hasShapeChanger || hasObjectSwitcher || hasMaterialSetter) { var clip = new AnimationClip(); clip.name = "MA Shape Changer Defaults";