This commit is contained in:
CroakFang
2022-11-02 09:21:12 +08:00
parent 3105b81489
commit 6d3167a563
2 changed files with 5 additions and 8 deletions
+5 -6
View File
@@ -277,12 +277,11 @@ public class UmaViewerBuilder : MonoBehaviour
CurrentUMAContainer.FaceDrivenKeyTarget.Container = CurrentUMAContainer;
FaceDriven.Initialize(firsehead.GetComponentsInChildren<Transform>().ToList());
CurrentUMAContainer.FaceEmotionKeyTarget = new FaceEmotionKeyTarget()
{
FaceDrivenKeyTarget = FaceDriven,
FaceEmotionKey = UmaDatabaseController.Instance.FaceTypeData.ToList()
};
CurrentUMAContainer.FaceEmotionKeyTarget.Initialize();
var emotionDriven = ScriptableObject.CreateInstance<FaceEmotionKeyTarget>();
CurrentUMAContainer.FaceEmotionKeyTarget = emotionDriven;
emotionDriven.FaceDrivenKeyTarget = FaceDriven;
emotionDriven.FaceEmotionKey = UmaDatabaseController.Instance.FaceTypeData.ToList();
emotionDriven.Initialize();
}
CurrentUMAContainer.MergeModel();
@@ -81,9 +81,7 @@ public class FaceEmotionKeyTarget : ScriptableObject
key.morph.weight += key.weight / 100 * emotion.Weight;
}
}
}
FaceDrivenKeyTarget.ChangeMorph();
}
}