This commit is contained in:
1605296300@qq.com
2022-09-03 14:12:11 +08:00
parent ddecea7a2a
commit e2a922c82f
4 changed files with 9 additions and 13 deletions
+3 -6
View File
@@ -227,12 +227,9 @@ public class UmaViewerBuilder : MonoBehaviour
{ {
var firsehead = CurrentContainer.Heads[0]; var firsehead = CurrentContainer.Heads[0];
var FaceDriven = firsehead.GetComponent<AssetHolder>()._assetTable.list.Find(a => { return a.Key == "facial_target"; }).Value as FaceDrivenKeyTarget; var FaceDriven = firsehead.GetComponent<AssetHolder>()._assetTable.list.Find(a => { return a.Key == "facial_target"; }).Value as FaceDrivenKeyTarget;
var newFaceDriven = firsehead.AddComponent<FaceDrivenKeyTarget>(); CurrentContainer.FaceDrivenKeyTargets = FaceDriven;
newFaceDriven.callBack = UmaViewerUI.Instance; FaceDriven.callBack = UmaViewerUI.Instance;
newFaceDriven._eyebrowTarget = FaceDriven._eyebrowTarget; FaceDriven.Initialize(firsehead.GetComponentsInChildren<Transform>().ToList());
newFaceDriven._eyeTarget = FaceDriven._eyeTarget;
newFaceDriven._mouthTarget = FaceDriven._mouthTarget;
CurrentContainer.FaceDrivenKeyTargets = newFaceDriven;
} }
LoadAsset(UmaViewerMain.Instance.AbList.FirstOrDefault(a => a.Name.EndsWith($"anm_eve_chr{id}_00_idle01_loop"))); LoadAsset(UmaViewerMain.Instance.AbList.FirstOrDefault(a => a.Name.EndsWith($"anm_eve_chr{id}_00_idle01_loop")));
@@ -5,13 +5,13 @@ using UnityEngine;
namespace Gallop namespace Gallop
{ {
public class FaceDrivenKeyTarget : MonoBehaviour public class FaceDrivenKeyTarget : ScriptableObject
{ {
public List<EyeTarget> _eyeTarget; public List<EyeTarget> _eyeTarget;
public List<EyebrowTarget> _eyebrowTarget; public List<EyebrowTarget> _eyebrowTarget;
public List<MouthTarget> _mouthTarget; public List<MouthTarget> _mouthTarget;
public List<Transform> Objs = new List<Transform>(); public List<Transform> Objs;
private FacialMorph BaseLEyeBrowMorph, BaseREyeBrowMorph; private FacialMorph BaseLEyeBrowMorph, BaseREyeBrowMorph;
private FacialMorph BaseLEyeMorph, BaseREyeMorph; private FacialMorph BaseLEyeMorph, BaseREyeMorph;
private FacialMorph BaseMouthMorph; private FacialMorph BaseMouthMorph;
@@ -21,10 +21,9 @@ namespace Gallop
public List<FacialMorph> MouthMorphs = new List<FacialMorph>(); public List<FacialMorph> MouthMorphs = new List<FacialMorph>();
public FaceLoadCallBack callBack; public FaceLoadCallBack callBack;
private void Start() public void Initialize(List<Transform> objs)
{ {
Objs = objs;
Objs.AddRange(GetComponentsInChildren<Transform>());
for (int i = 0; i < _eyebrowTarget.Count; i++) for (int i = 0; i < _eyebrowTarget.Count; i++)
{ {
@@ -2,7 +2,7 @@
namespace Gallop.Live.Cutt namespace Gallop.Live.Cutt
{ {
public class LiveTimelineWorkSheet:MonoBehaviour public class LiveTimelineWorkSheet:ScriptableObject
{ {
} }
@@ -6244,7 +6244,7 @@ Texture2D:
m_MipsStripped: 0 m_MipsStripped: 0
m_TextureFormat: 1 m_TextureFormat: 1
m_MipCount: 1 m_MipCount: 1
m_IsReadable: 0 m_IsReadable: 1
m_IsPreProcessed: 0 m_IsPreProcessed: 0
m_IgnoreMasterTextureLimit: 0 m_IgnoreMasterTextureLimit: 0
m_StreamingMipmaps: 0 m_StreamingMipmaps: 0