From f44b8695ffad94e5dcf2f20a93fa281eedd62400 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B7=A6=E5=8F=B3=E7=9C=8B?= <1918891542@qq.com> Date: Mon, 31 Oct 2022 18:12:12 +0800 Subject: [PATCH 01/10] Add morph name --- Assets/Scripts/UmaViewerUI.cs | 2 +- Assets/Scripts/umamusume/Gallop/FaceDrivenKeyTarget.cs | 5 +++++ Assets/Scripts/umamusume/Gallop/FacialMorph.cs | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Assets/Scripts/UmaViewerUI.cs b/Assets/Scripts/UmaViewerUI.cs index 84efc86..846edf6 100644 --- a/Assets/Scripts/UmaViewerUI.cs +++ b/Assets/Scripts/UmaViewerUI.cs @@ -176,7 +176,7 @@ public class UmaViewerUI : MonoBehaviour foreach (FacialMorph morph in tempMorph) { var container = Instantiate(UmaContainerSliderPrefab, FacialList.content).GetComponent(); - container.Name.text = morph.name; + container.Name.text = morph.name + " (" + morph.tag + ")"; container.Slider.value = morph.Weight; container.Slider.maxValue = 1; container.Slider.minValue = 0; diff --git a/Assets/Scripts/umamusume/Gallop/FaceDrivenKeyTarget.cs b/Assets/Scripts/umamusume/Gallop/FaceDrivenKeyTarget.cs index 8ac3dcb..be9c558 100644 --- a/Assets/Scripts/umamusume/Gallop/FaceDrivenKeyTarget.cs +++ b/Assets/Scripts/umamusume/Gallop/FaceDrivenKeyTarget.cs @@ -2,6 +2,8 @@ using System.Collections; using System.Collections.Generic; using System.Text; using UnityEngine; +using Gallop.Live.Cutt; +using System; namespace Gallop { @@ -33,6 +35,7 @@ namespace Gallop morph.target = this; morph.direction = j > 0; morph.name = "EyeBrow_" + i + "_" + (morph.direction ? "L" : "R"); + morph.tag = Enum.GetName(typeof(LiveTimelineDefine.FacialEyebrowId), i); morph.trsArray = _eyebrowTarget[i]._faceGroupInfo[j]._trsArray; foreach (TrsArray trs in morph.trsArray) { @@ -58,6 +61,7 @@ namespace Gallop morph.target = this; morph.direction = j > 0; morph.name = "Eye_" + i + "_" + (morph.direction ? "L" : "R"); + morph.tag = Enum.GetName(typeof(LiveTimelineDefine.FacialEyeId), i); morph.trsArray = _eyeTarget[i]._faceGroupInfo[j]._trsArray; foreach (TrsArray trs in morph.trsArray) { @@ -83,6 +87,7 @@ namespace Gallop morph.target = this; morph.direction = j > 0; morph.name = "Mouth_" + i + "_" + j; + morph.tag = Enum.GetName(typeof(LiveTimelineDefine.FacialMouthId), i); morph.trsArray = _mouthTarget[i]._faceGroupInfo[j]._trsArray; foreach (TrsArray trs in morph.trsArray) { diff --git a/Assets/Scripts/umamusume/Gallop/FacialMorph.cs b/Assets/Scripts/umamusume/Gallop/FacialMorph.cs index 614429c..c7a0dca 100644 --- a/Assets/Scripts/umamusume/Gallop/FacialMorph.cs +++ b/Assets/Scripts/umamusume/Gallop/FacialMorph.cs @@ -11,6 +11,7 @@ namespace Gallop public class FacialMorph { public string name; + public string tag = ""; public bool direction; public FaceDrivenKeyTarget target; private float _weight; From 5f5f96bf4e23c7adad7c09ff180a647cb7bd6831 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B7=A6=E5=8F=B3=E7=9C=8B?= <1918891542@qq.com> Date: Tue, 1 Nov 2022 02:21:30 +0800 Subject: [PATCH 02/10] Add preset emotion --- Assets/Scripts/UmaContainer.cs | 60 ++++- Assets/Scripts/UmaDatabase/UmaDataTypes.cs | 32 ++- Assets/Scripts/UmaViewerBuilder.cs | 2 + Assets/Scripts/UmaViewerUI.cs | 212 ++++++++++++++++++ .../umamusume/Gallop/FaceDrivenKeyTarget.cs | 25 +++ .../Scripts/umamusume/Gallop/FacialMorph.cs | 4 +- Packages/packages-lock.json | 24 +- 7 files changed, 343 insertions(+), 16 deletions(-) diff --git a/Assets/Scripts/UmaContainer.cs b/Assets/Scripts/UmaContainer.cs index 6caa125..1ae9f71 100644 --- a/Assets/Scripts/UmaContainer.cs +++ b/Assets/Scripts/UmaContainer.cs @@ -7,6 +7,8 @@ using UnityEngine; public class UmaContainer : MonoBehaviour { + UmaViewerUI UI => UmaViewerUI.Instance; + public JObject CharaData; public GameObject Body; public GameObject Tail; @@ -20,7 +22,7 @@ public class UmaContainer : MonoBehaviour [Header("Face")] public List FacialClips = new List(); public FaceDrivenKeyTarget FaceDrivenKeyTargets; - + public List FaceEmotionKey; [Header("Generic")] public bool IsGeneric = false; @@ -132,4 +134,60 @@ public class UmaContainer : MonoBehaviour spring.InitializePhysics(); } } + + private void Update() + { + if(FaceDrivenKeyTargets != null) + { + if (FaceDrivenKeyTargets.needUpdate) + { + FaceDrivenKeyTargets.ChangeMorph(); + FaceDrivenKeyTargets.needUpdate = false; + } + if (FaceDrivenKeyTargets.needAllUpdate) + { + FaceDrivenKeyTargets.ClearMorph(); + foreach(var emotion in FaceEmotionKey) + { + if(emotion.mouthTarget != null) + { + foreach (var key in emotion.mouthTarget) + { + key.morph.Weight += key.weight / 100 * emotion.Weight; + } + } + if (emotion.eyeLTarget != null) + { + foreach (var key in emotion.eyeLTarget) + { + key.morph.Weight += key.weight / 100 * emotion.Weight; + } + } + if (emotion.eyeRTarget != null) + { + foreach (var key in emotion.eyeRTarget) + { + key.morph.Weight += key.weight / 100 * emotion.Weight; + } + } + if (emotion.eyebrowLTarget != null) + { + foreach (var key in emotion.eyeRTarget) + { + key.morph.Weight += key.weight / 100 * emotion.Weight; + } + } + if (emotion.eyebrowRTarget != null) + { + foreach (var key in emotion.eyeRTarget) + { + key.morph.Weight += key.weight / 100 * emotion.Weight; + } + } + } + FaceDrivenKeyTargets.ChangeMorph(); + FaceDrivenKeyTargets.needAllUpdate = false; + } + } + } } diff --git a/Assets/Scripts/UmaDatabase/UmaDataTypes.cs b/Assets/Scripts/UmaDatabase/UmaDataTypes.cs index ca4c401..3585d87 100644 --- a/Assets/Scripts/UmaDatabase/UmaDataTypes.cs +++ b/Assets/Scripts/UmaDatabase/UmaDataTypes.cs @@ -1,6 +1,8 @@ -using System.Collections; +using RootMotion.Dynamics; +using System.Collections; using System.Collections.Generic; using UnityEngine; +using Gallop; public class UmaDatabaseEntry { @@ -30,11 +32,39 @@ public class UmaLyricsData public string text; } +public class EmotionKey +{ + public FacialMorph morph; + public float weight; +} + [System.Serializable] public class FaceTypeData { public string label, eyebrow_l, eyebrow_r, eye_l, eye_r, mouth, inverce_face_type; public int mouth_shape_type, set_face_group; + + public FaceDrivenKeyTarget target; + + public List mouthTarget; + public List eyeLTarget; + public List eyeRTarget; + public List eyebrowLTarget; + public List eyebrowRTarget; + + private float _weight; + public float Weight + { + get + { + return _weight; + } + set + { + _weight = value; + target.needAllUpdate = true; + } + } } public enum UmaFileType diff --git a/Assets/Scripts/UmaViewerBuilder.cs b/Assets/Scripts/UmaViewerBuilder.cs index 8071388..ad03aa5 100644 --- a/Assets/Scripts/UmaViewerBuilder.cs +++ b/Assets/Scripts/UmaViewerBuilder.cs @@ -272,6 +272,8 @@ public class UmaViewerBuilder : MonoBehaviour var firsehead = CurrentUMAContainer.Head; var FaceDriven = firsehead.GetComponent()._assetTable.list.Find(a => { return a.Key == "facial_target"; }).Value as FaceDrivenKeyTarget; CurrentUMAContainer.FaceDrivenKeyTargets = FaceDriven; + CurrentUMAContainer.FaceEmotionKey = UmaDatabaseController.Instance.FaceTypeData.ToList(); + CurrentUMAContainer.FaceDrivenKeyTargets.Container = CurrentUMAContainer; FaceDriven.Initialize(firsehead.GetComponentsInChildren().ToList()); } diff --git a/Assets/Scripts/UmaViewerUI.cs b/Assets/Scripts/UmaViewerUI.cs index 846edf6..68692b7 100644 --- a/Assets/Scripts/UmaViewerUI.cs +++ b/Assets/Scripts/UmaViewerUI.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; +using System.Text.RegularExpressions; using TMPro; using UnityEngine; using UnityEngine.UI; @@ -31,6 +32,7 @@ public class UmaViewerUI : MonoBehaviour public ScrollRect PropList; public ScrollRect SceneList; + public ScrollRect EmotionList; public ScrollRect FacialList; public ScrollRect LiveList; public ScrollRect LiveSoundList; @@ -77,6 +79,8 @@ public class UmaViewerUI : MonoBehaviour public bool isCriware = false; public bool isHeadFix = false; + public FaceDrivenKeyTarget currentMorph; + private void Awake() { Instance = this; @@ -184,6 +188,214 @@ public class UmaViewerUI : MonoBehaviour } } + public void UpdateFacialPanels() + { + LoadFacialPanels(currentMorph); + } + + public void LoadEmotionPanels(FaceDrivenKeyTarget target) + { + foreach (UmaUIContainer ui in EmotionList.content.GetComponentsInChildren()) + { + Destroy(ui.gameObject); + } + + + + foreach(var emotion in target.Container.FaceEmotionKey) + { + if(emotion.label == "Base") + { + continue; + } + + emotion.target = target; + + emotion.mouthTarget = new List(); + foreach(var morphName in emotion.mouth.Split('|')) + { + EmotionKey newValue = new EmotionKey(); + if (morphName.Contains("__")) + { + var splitArray = Regex.Split(morphName, "__", RegexOptions.IgnoreCase); + if(splitArray[0] == "Base") + { + continue; + } + else + { + newValue.morph = target.MouthMorphs.Where(a => a.tag == splitArray[0]).First(); + } + newValue.weight = Convert.ToInt32(splitArray[1]); + UnityEngine.Debug.Log(newValue.weight); + emotion.mouthTarget.Add(newValue); + } + else + { + UnityEngine.Debug.Log(morphName); + if (morphName == "Base") + { + continue; + } + else + { + newValue.morph = target.MouthMorphs.Where(a => a.tag == morphName).First(); + } + newValue.weight = 100; + emotion.mouthTarget.Add(newValue); + } + } + + emotion.eyeLTarget = new List(); + foreach (var morphName in emotion.eye_l.Split('|')) + { + EmotionKey newValue = new EmotionKey(); + if (morphName.Contains("__")) + { + var splitArray = Regex.Split(morphName, "__", RegexOptions.IgnoreCase); + if (splitArray[0] == "Base") + { + continue; + } + else + { + newValue.morph = target.EyeMorphs.Where(a => a.tag == splitArray[0] && a.direction == true).First(); + } + newValue.weight = Convert.ToInt32(splitArray[1]); + UnityEngine.Debug.Log(newValue.weight); + emotion.mouthTarget.Add(newValue); + } + else + { + UnityEngine.Debug.Log(morphName); + if (morphName == "Base") + { + continue; + } + else + { + newValue.morph = target.EyeMorphs.Where(a => a.tag == morphName && a.direction == true).First(); + } + newValue.weight = 100; + emotion.mouthTarget.Add(newValue); + } + } + + emotion.eyeRTarget = new List(); + foreach (var morphName in emotion.eye_r.Split('|')) + { + EmotionKey newValue = new EmotionKey(); + if (morphName.Contains("__")) + { + var splitArray = Regex.Split(morphName, "__", RegexOptions.IgnoreCase); + if (splitArray[0] == "Base") + { + continue; + } + else + { + newValue.morph = target.EyeMorphs.Where(a => a.tag == splitArray[0] && a.direction == false).First(); + } + newValue.weight = Convert.ToInt32(splitArray[1]); + UnityEngine.Debug.Log(newValue.weight); + emotion.mouthTarget.Add(newValue); + } + else + { + UnityEngine.Debug.Log(morphName); + if (morphName == "Base") + { + continue; + } + else + { + newValue.morph = target.EyeMorphs.Where(a => a.tag == morphName && a.direction == false).First(); + } + newValue.weight = 100; + emotion.mouthTarget.Add(newValue); + } + } + + emotion.eyebrowLTarget = new List(); + foreach (var morphName in emotion.eyebrow_l.Split('|')) + { + EmotionKey newValue = new EmotionKey(); + if (morphName.Contains("__")) + { + var splitArray = Regex.Split(morphName, "__", RegexOptions.IgnoreCase); + if (splitArray[0] == "Base") + { + continue; + } + else + { + newValue.morph = target.EyeBrowMorphs.Where(a => a.tag == splitArray[0] && a.direction == true).First(); + } + newValue.weight = Convert.ToInt32(splitArray[1]); + UnityEngine.Debug.Log(newValue.weight); + emotion.mouthTarget.Add(newValue); + } + else + { + UnityEngine.Debug.Log(morphName); + if (morphName == "Base") + { + continue; + } + else + { + newValue.morph = target.EyeBrowMorphs.Where(a => a.tag == morphName && a.direction == true).First(); + } + newValue.weight = 100; + emotion.mouthTarget.Add(newValue); + } + } + + emotion.eyebrowRTarget = new List(); + foreach (var morphName in emotion.eyebrow_r.Split('|')) + { + EmotionKey newValue = new EmotionKey(); + if (morphName.Contains("__")) + { + var splitArray = Regex.Split(morphName, "__", RegexOptions.IgnoreCase); + if (splitArray[0] == "Base") + { + continue; + } + else + { + newValue.morph = target.EyeBrowMorphs.Where(a => a.tag == splitArray[0] && a.direction == false).First(); + } + newValue.weight = Convert.ToInt32(splitArray[1]); + UnityEngine.Debug.Log(newValue.weight); + emotion.mouthTarget.Add(newValue); + } + else + { + UnityEngine.Debug.Log(morphName); + if (morphName == "Base") + { + continue; + } + else + { + newValue.morph = target.EyeBrowMorphs.Where(a => a.tag == morphName && a.direction == false).First(); + } + newValue.weight = 100; + emotion.mouthTarget.Add(newValue); + } + } + + + var container = Instantiate(UmaContainerSliderPrefab, EmotionList.content).GetComponent(); + container.Name.text = emotion.label; + container.Slider.value = emotion.Weight; + container.Slider.maxValue = 1; + container.Slider.minValue = 0; + container.Slider.onValueChanged.AddListener((a) => { emotion.Weight = a; }); + } + } + public void LoadLivePanels() { foreach (var live in Main.Lives.OrderBy(c => c.MusicId)) diff --git a/Assets/Scripts/umamusume/Gallop/FaceDrivenKeyTarget.cs b/Assets/Scripts/umamusume/Gallop/FaceDrivenKeyTarget.cs index be9c558..f757c99 100644 --- a/Assets/Scripts/umamusume/Gallop/FaceDrivenKeyTarget.cs +++ b/Assets/Scripts/umamusume/Gallop/FaceDrivenKeyTarget.cs @@ -22,6 +22,10 @@ namespace Gallop public List EyeMorphs = new List(); public List MouthMorphs = new List(); + public bool needUpdate = false; + public bool needAllUpdate = false; + public UmaContainer Container; + Dictionary RotationRecorder = new Dictionary(); public void Initialize(List objs) { @@ -106,6 +110,8 @@ namespace Gallop FacialReset(); MouthMorphs[3].Weight = 1; if (UmaViewerUI.Instance) { UmaViewerUI.Instance.LoadFacialPanels(this); } + if (UmaViewerUI.Instance) { UmaViewerUI.Instance.LoadEmotionPanels(this); } + if (UmaViewerUI.Instance) { UmaViewerUI.Instance.currentMorph = this; } } public void ChangeMorph() @@ -129,6 +135,25 @@ namespace Gallop ApplyRotation(); } + + public void ClearMorph() + { + foreach (FacialMorph morph in EyeBrowMorphs) + { + morph._weight = 0; + } + + foreach (FacialMorph morph in EyeMorphs) + { + morph._weight = 0; + } + + foreach (FacialMorph morph in MouthMorphs) + { + morph._weight = 0; + } + } + private void ProcessMorph(FacialMorph morph) { foreach (TrsArray trs in morph.trsArray) diff --git a/Assets/Scripts/umamusume/Gallop/FacialMorph.cs b/Assets/Scripts/umamusume/Gallop/FacialMorph.cs index c7a0dca..f5b443b 100644 --- a/Assets/Scripts/umamusume/Gallop/FacialMorph.cs +++ b/Assets/Scripts/umamusume/Gallop/FacialMorph.cs @@ -14,7 +14,7 @@ namespace Gallop public string tag = ""; public bool direction; public FaceDrivenKeyTarget target; - private float _weight; + public float _weight; public float Weight { get @@ -24,7 +24,7 @@ namespace Gallop set { _weight = value; - target.ChangeMorph(); + target.needUpdate = true; } } public List trsArray; diff --git a/Packages/packages-lock.json b/Packages/packages-lock.json index 99b6b22..1ebb68e 100644 --- a/Packages/packages-lock.json +++ b/Packages/packages-lock.json @@ -5,7 +5,7 @@ "depth": 1, "source": "registry", "dependencies": {}, - "url": "https://packages.unity.com" + "url": "https://packages.unity.cn" }, "com.unity.assetbundlebrowser": { "version": "https://github.com/Unity-Technologies/AssetBundles-Browser.git", @@ -21,14 +21,14 @@ "dependencies": { "com.unity.services.core": "1.0.1" }, - "url": "https://packages.unity.com" + "url": "https://packages.unity.cn" }, "com.unity.ext.nunit": { "version": "1.0.6", "depth": 1, "source": "registry", "dependencies": {}, - "url": "https://packages.unity.com" + "url": "https://packages.unity.cn" }, "com.unity.formats.fbx": { "version": "4.1.2", @@ -38,7 +38,7 @@ "com.unity.timeline": "1.5.2", "com.autodesk.fbx": "4.1.1" }, - "url": "https://packages.unity.com" + "url": "https://packages.unity.cn" }, "com.unity.ide.rider": { "version": "2.0.7", @@ -47,7 +47,7 @@ "dependencies": { "com.unity.test-framework": "1.1.1" }, - "url": "https://packages.unity.com" + "url": "https://packages.unity.cn" }, "com.unity.ide.visualstudio": { "version": "2.0.16", @@ -56,14 +56,14 @@ "dependencies": { "com.unity.test-framework": "1.1.9" }, - "url": "https://packages.unity.com" + "url": "https://packages.unity.cn" }, "com.unity.ide.vscode": { "version": "1.2.5", "depth": 0, "source": "registry", "dependencies": {}, - "url": "https://packages.unity.com" + "url": "https://packages.unity.cn" }, "com.unity.postprocessing": { "version": "3.2.2", @@ -72,7 +72,7 @@ "dependencies": { "com.unity.modules.physics": "1.0.0" }, - "url": "https://packages.unity.com" + "url": "https://packages.unity.cn" }, "com.unity.services.core": { "version": "1.0.1", @@ -81,7 +81,7 @@ "dependencies": { "com.unity.modules.unitywebrequest": "1.0.0" }, - "url": "https://packages.unity.com" + "url": "https://packages.unity.cn" }, "com.unity.test-framework": { "version": "1.1.31", @@ -92,7 +92,7 @@ "com.unity.modules.imgui": "1.0.0", "com.unity.modules.jsonserialize": "1.0.0" }, - "url": "https://packages.unity.com" + "url": "https://packages.unity.cn" }, "com.unity.textmeshpro": { "version": "3.0.6", @@ -101,7 +101,7 @@ "dependencies": { "com.unity.ugui": "1.0.0" }, - "url": "https://packages.unity.com" + "url": "https://packages.unity.cn" }, "com.unity.timeline": { "version": "1.5.2", @@ -113,7 +113,7 @@ "com.unity.modules.audio": "1.0.0", "com.unity.modules.particlesystem": "1.0.0" }, - "url": "https://packages.unity.com" + "url": "https://packages.unity.cn" }, "com.unity.ugui": { "version": "1.0.0", From c81dd5b25f5599fee6180510136347d52432bc2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B7=A6=E5=8F=B3=E7=9C=8B?= <1918891542@qq.com> Date: Tue, 1 Nov 2022 02:52:22 +0800 Subject: [PATCH 03/10] update --- Assets/Scripts/UmaViewerBuilder.cs | 2 ++ Assets/Scripts/UmaViewerUI.cs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Assets/Scripts/UmaViewerBuilder.cs b/Assets/Scripts/UmaViewerBuilder.cs index ad03aa5..3bb1ea4 100644 --- a/Assets/Scripts/UmaViewerBuilder.cs +++ b/Assets/Scripts/UmaViewerBuilder.cs @@ -1029,6 +1029,8 @@ public class UmaViewerBuilder : MonoBehaviour if (CurrentUMAContainer != null) { //It seems that OnDestroy will executed after new model loaded, which cause new FacialPanels empty... + UmaViewerUI.Instance.currentMorph = null; + UmaViewerUI.Instance.LoadEmotionPanels(null); UmaViewerUI.Instance.LoadFacialPanels(null); Destroy(CurrentUMAContainer.gameObject); } diff --git a/Assets/Scripts/UmaViewerUI.cs b/Assets/Scripts/UmaViewerUI.cs index 68692b7..e8f863f 100644 --- a/Assets/Scripts/UmaViewerUI.cs +++ b/Assets/Scripts/UmaViewerUI.cs @@ -200,7 +200,7 @@ public class UmaViewerUI : MonoBehaviour Destroy(ui.gameObject); } - + if (target == null) return; foreach(var emotion in target.Container.FaceEmotionKey) { From fe4e709b819756eb83855954e4600e82705e7510 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B7=A6=E5=8F=B3=E7=9C=8B?= <1918891542@qq.com> Date: Tue, 1 Nov 2022 03:53:56 +0800 Subject: [PATCH 04/10] update --- Assets/Scenes/Version2.unity | 1282 +++++++++++++++++++++++++++++++++- 1 file changed, 1260 insertions(+), 22 deletions(-) diff --git a/Assets/Scenes/Version2.unity b/Assets/Scenes/Version2.unity index 9430f52..55334e3 100644 --- a/Assets/Scenes/Version2.unity +++ b/Assets/Scenes/Version2.unity @@ -5881,6 +5881,81 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 388427687} m_CullTransparentMesh: 1 +--- !u!1 &390291679 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 390291680} + - component: {fileID: 390291682} + - component: {fileID: 390291681} + m_Layer: 5 + m_Name: Handle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &390291680 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 390291679} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1062466564} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &390291681 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 390291679} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &390291682 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 390291679} + m_CullTransparentMesh: 1 --- !u!1 &399621053 GameObject: m_ObjectHideFlags: 0 @@ -8921,6 +8996,83 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 523153147} m_CullTransparentMesh: 1 +--- !u!1 &527457843 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 527457844} + - component: {fileID: 527457846} + - component: {fileID: 527457845} + m_Layer: 5 + m_Name: Content + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &527457844 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 527457843} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1574972172} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0, y: 1} +--- !u!114 &527457845 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 527457843} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 0 + m_Spacing: 0 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 1 + m_ChildControlWidth: 1 + m_ChildControlHeight: 0 + m_ChildScaleWidth: 0 + m_ChildScaleHeight: 0 + m_ReverseArrangement: 0 +--- !u!114 &527457846 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 527457843} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HorizontalFit: 0 + m_VerticalFit: 2 --- !u!1 &538060552 GameObject: m_ObjectHideFlags: 0 @@ -10670,6 +10822,140 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 685507282} m_CullTransparentMesh: 1 +--- !u!1 &695163798 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 695163799} + - component: {fileID: 695163801} + - component: {fileID: 695163800} + m_Layer: 5 + m_Name: Text (TMP) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &695163799 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 695163798} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1027345407} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &695163800 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 695163798} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: Morph + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4294967295 + m_fontColor: {r: 1, g: 1, b: 1, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 28 + m_fontSizeBase: 28 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 512 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_enableWordWrapping: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 1 + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!222 &695163801 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 695163798} + m_CullTransparentMesh: 1 --- !u!1001 &695731892 PrefabInstance: m_ObjectHideFlags: 0 @@ -12082,6 +12368,140 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 703812186} m_CullTransparentMesh: 1 +--- !u!1 &732520867 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 732520868} + - component: {fileID: 732520870} + - component: {fileID: 732520869} + m_Layer: 5 + m_Name: Text (TMP) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &732520868 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 732520867} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1296932688} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: -0.000061035156, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &732520869 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 732520867} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: Emotion + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4294967295 + m_fontColor: {r: 1, g: 1, b: 1, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 28 + m_fontSizeBase: 28 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 512 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_enableWordWrapping: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 1 + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!222 &732520870 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 732520867} + m_CullTransparentMesh: 1 --- !u!1 &733646224 GameObject: m_ObjectHideFlags: 0 @@ -16827,6 +17247,187 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1000946148} m_CullTransparentMesh: 1 +--- !u!1 &1027345406 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1027345407} + - component: {fileID: 1027345410} + - component: {fileID: 1027345409} + - component: {fileID: 1027345408} + m_Layer: 5 + m_Name: Morph + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1027345407 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1027345406} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 695163799} + m_Father: {fileID: 2059749648} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 176.66667, y: -15} + m_SizeDelta: {x: 146.66667, y: 30} + m_Pivot: {x: 0, y: 0.5} +--- !u!114 &1027345408 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1027345406} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 0, g: 0, b: 0, a: 0.3254902} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 1, g: 1, b: 1, a: 0.2901961} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1027345409} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1684693613} + m_TargetAssemblyTypeName: UnityEngine.GameObject, UnityEngine + m_MethodName: SetActive + m_Mode: 6 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 1 + m_CallState: 2 + - m_Target: {fileID: 1027345408} + m_TargetAssemblyTypeName: UnityEngine.UI.Selectable, UnityEngine.UI + m_MethodName: set_interactable + m_Mode: 6 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + - m_Target: {fileID: 1296932685} + m_TargetAssemblyTypeName: UnityEngine.UI.Selectable, UnityEngine.UI + m_MethodName: set_interactable + m_Mode: 6 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 1 + m_CallState: 2 + - m_Target: {fileID: 1699478758} + m_TargetAssemblyTypeName: UnityEngine.GameObject, UnityEngine + m_MethodName: SetActive + m_Mode: 6 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + - m_Target: {fileID: 1564959567} + m_TargetAssemblyTypeName: UmaViewerUI, umamusume + m_MethodName: UpdateFacialPanels + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!114 &1027345409 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1027345406} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &1027345410 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1027345406} + m_CullTransparentMesh: 1 --- !u!1 &1035592436 GameObject: m_ObjectHideFlags: 0 @@ -17329,6 +17930,42 @@ MonoBehaviour: m_EditorClassIdentifier: m_HorizontalFit: 0 m_VerticalFit: 2 +--- !u!1 &1062466563 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1062466564} + m_Layer: 5 + m_Name: Sliding Area + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1062466564 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1062466563} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 390291680} + m_Father: {fileID: 2097908527} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -20, y: -20} + m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &1065889391 GameObject: m_ObjectHideFlags: 0 @@ -20776,6 +21413,175 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1296918361} m_CullTransparentMesh: 1 +--- !u!1 &1296932684 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1296932688} + - component: {fileID: 1296932687} + - component: {fileID: 1296932686} + - component: {fileID: 1296932685} + m_Layer: 5 + m_Name: Emotion + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1296932685 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1296932684} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 0, g: 0, b: 0, a: 0.3254902} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 1, g: 1, b: 1, a: 0.2901961} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 0 + m_TargetGraphic: {fileID: 1296932686} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1699478758} + m_TargetAssemblyTypeName: UnityEngine.GameObject, UnityEngine + m_MethodName: SetActive + m_Mode: 6 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 1 + m_CallState: 2 + - m_Target: {fileID: 1296932685} + m_TargetAssemblyTypeName: UnityEngine.UI.Selectable, UnityEngine.UI + m_MethodName: set_interactable + m_Mode: 6 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + - m_Target: {fileID: 1027345408} + m_TargetAssemblyTypeName: UnityEngine.UI.Selectable, UnityEngine.UI + m_MethodName: set_interactable + m_Mode: 6 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 1 + m_CallState: 2 + - m_Target: {fileID: 1684693613} + m_TargetAssemblyTypeName: UnityEngine.GameObject, UnityEngine + m_MethodName: SetActive + m_Mode: 6 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!114 &1296932686 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1296932684} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &1296932687 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1296932684} + m_CullTransparentMesh: 1 +--- !u!224 &1296932688 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1296932684} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 732520868} + m_Father: {fileID: 2059749648} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 15, y: -15} + m_SizeDelta: {x: 146.66667, y: 30} + m_Pivot: {x: 0, y: 0.5} --- !u!1 &1297525976 GameObject: m_ObjectHideFlags: 0 @@ -21126,7 +21932,9 @@ RectTransform: m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: + - {fileID: 2059749648} - {fileID: 1684693614} + - {fileID: 1699478759} m_Father: {fileID: 242004464} m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -24079,6 +24887,7 @@ MonoBehaviour: MiniAnimationList: {fileID: 420311250} PropList: {fileID: 1878249919} SceneList: {fileID: 835845609} + EmotionList: {fileID: 1699478760} FacialList: {fileID: 1684693617} LiveList: {fileID: 1970310175} LiveSoundList: {fileID: 1678768233} @@ -24125,6 +24934,7 @@ MonoBehaviour: UIColor2: {r: 1, g: 1, b: 1, a: 1} isCriware: 0 isHeadFix: 0 + currentMorph: {fileID: 0} --- !u!114 &1564959568 MonoBehaviour: m_ObjectHideFlags: 0 @@ -24318,6 +25128,96 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1568796215} m_CullTransparentMesh: 1 +--- !u!1 &1574972171 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1574972172} + - component: {fileID: 1574972175} + - component: {fileID: 1574972174} + - component: {fileID: 1574972173} + m_Layer: 5 + m_Name: Viewport + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1574972172 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1574972171} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 527457844} + m_Father: {fileID: 1699478759} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -17, y: 0} + m_Pivot: {x: 0, y: 1} +--- !u!114 &1574972173 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1574972171} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 31a19414c41e5ae4aae2af33fee712f6, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ShowMaskGraphic: 0 +--- !u!114 &1574972174 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1574972171} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &1574972175 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1574972171} + m_CullTransparentMesh: 1 --- !u!1 &1576308332 GameObject: m_ObjectHideFlags: 0 @@ -26541,7 +27441,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!224 &1684693614 RectTransform: m_ObjectHideFlags: 0 @@ -26556,12 +27456,12 @@ RectTransform: - {fileID: 561186068} - {fileID: 1427253374} m_Father: {fileID: 1339030790} - m_RootOrder: 0 + m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 0, y: -30} - m_SizeDelta: {x: 255, y: -60} + m_AnchoredPosition: {x: 0, y: -45} + m_SizeDelta: {x: 255, y: -90} m_Pivot: {x: 0, y: 0.5} --- !u!114 &1684693615 MonoBehaviour: @@ -26876,6 +27776,114 @@ RectTransform: m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &1699478758 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1699478759} + - component: {fileID: 1699478762} + - component: {fileID: 1699478761} + - component: {fileID: 1699478760} + m_Layer: 5 + m_Name: Emotion List + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1699478759 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1699478758} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1574972172} + - {fileID: 2097908527} + m_Father: {fileID: 1339030790} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 0, y: -45} + m_SizeDelta: {x: 255, y: -90} + m_Pivot: {x: 0, y: 0.5} +--- !u!114 &1699478760 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1699478758} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1aa08ab6e0800fa44ae55d278d1423e3, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Content: {fileID: 527457844} + m_Horizontal: 0 + m_Vertical: 1 + m_MovementType: 2 + m_Elasticity: 0.1 + m_Inertia: 1 + m_DecelerationRate: 0.135 + m_ScrollSensitivity: 90 + m_Viewport: {fileID: 1574972172} + m_HorizontalScrollbar: {fileID: 0} + m_VerticalScrollbar: {fileID: 2097908528} + m_HorizontalScrollbarVisibility: 2 + m_VerticalScrollbarVisibility: 2 + m_HorizontalScrollbarSpacing: -3 + m_VerticalScrollbarSpacing: -3 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] +--- !u!114 &1699478761 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1699478758} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 0.392} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &1699478762 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1699478758} + m_CullTransparentMesh: 1 --- !u!1 &1704906815 GameObject: m_ObjectHideFlags: 0 @@ -31945,6 +32953,110 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &2059749647 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2059749648} + - component: {fileID: 2059749651} + - component: {fileID: 2059749650} + - component: {fileID: 2059749649} + m_Layer: 5 + m_Name: Type + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2059749648 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2059749647} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1296932688} + - {fileID: 1027345407} + m_Father: {fileID: 1339030790} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 0, y: -60} + m_SizeDelta: {x: 255, y: 30} + m_Pivot: {x: 0, y: 1} +--- !u!114 &2059749649 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2059749647} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 0.392} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &2059749650 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2059749647} + m_CullTransparentMesh: 1 +--- !u!114 &2059749651 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2059749647} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 30649d3a9faa99c48a7b1166b86bf2a0, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 15 + m_Right: 15 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 0 + m_Spacing: 15 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 1 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 + m_ChildScaleWidth: 0 + m_ChildScaleHeight: 0 + m_ReverseArrangement: 0 --- !u!1 &2062531603 GameObject: m_ObjectHideFlags: 0 @@ -32616,6 +33728,132 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2094428665} m_CullTransparentMesh: 1 +--- !u!1 &2097908526 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2097908527} + - component: {fileID: 2097908530} + - component: {fileID: 2097908529} + - component: {fileID: 2097908528} + m_Layer: 5 + m_Name: Scrollbar Vertical + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2097908527 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2097908526} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1062466564} + m_Father: {fileID: 1699478759} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 20, y: 0} + m_Pivot: {x: 1, y: 1} +--- !u!114 &2097908528 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2097908526} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2a4db7a114972834c8e4117be1d82ba3, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 390291681} + m_HandleRect: {fileID: 390291680} + m_Direction: 2 + m_Value: 0 + m_Size: 1 + m_NumberOfSteps: 0 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] +--- !u!114 &2097908529 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2097908526} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &2097908530 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2097908526} + m_CullTransparentMesh: 1 --- !u!1 &2100982334 GameObject: m_ObjectHideFlags: 0 @@ -33740,9 +34978,9 @@ RectTransform: m_Father: {fileID: 6878219667498913896} m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 106.5, y: -345.41663} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 180, y: 20} m_Pivot: {x: 0.5, y: 1} --- !u!114 &6878219665895574065 @@ -34248,9 +35486,9 @@ RectTransform: m_Father: {fileID: 6878219667498913896} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 106.5, y: -69.08333} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 180, y: 20} m_Pivot: {x: 0.5, y: 1} --- !u!114 &6878219666109573094 @@ -36604,9 +37842,9 @@ RectTransform: m_Father: {fileID: 6878219667498913896} m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 106.5, y: -207.24998} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 180, y: 20} m_Pivot: {x: 0.5, y: 1} --- !u!114 &6878219666841734894 @@ -37435,9 +38673,9 @@ RectTransform: m_Father: {fileID: 6878219667498913896} m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 106.5, y: -276.3333} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 180, y: 20} m_Pivot: {x: 0.5, y: 1} --- !u!114 &6878219667203546886 @@ -39147,9 +40385,9 @@ RectTransform: m_Father: {fileID: 6878219667498913896} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 106.5, y: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 180, y: 20} m_Pivot: {x: 0.5, y: 1} --- !u!114 &6878219667749320559 @@ -39367,9 +40605,9 @@ RectTransform: m_Father: {fileID: 6878219667498913896} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 106.5, y: -138.16666} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 180, y: 20} m_Pivot: {x: 0.5, y: 1} --- !u!1 &6878219667784581358 From b96df921bbdaf3863f287eed9815c9d3ee3e66a6 Mon Sep 17 00:00:00 2001 From: CroakFang <1605296300@qq.com> Date: Tue, 1 Nov 2022 13:48:26 +0800 Subject: [PATCH 05/10] Merge duplicate code and optimize code --- Assets/Scripts/UmaContainer.cs | 75 +------ Assets/Scripts/UmaDatabase/UmaDataTypes.cs | 4 +- Assets/Scripts/UmaViewerBuilder.cs | 48 +++-- Assets/Scripts/UmaViewerUI.cs | 192 +----------------- .../umamusume/Gallop/FaceDrivenKeyTarget.cs | 100 +++------ .../umamusume/Gallop/FaceEmotionKeyTarget.cs | 115 +++++++++++ .../Gallop/FaceEmotionKeyTarget.cs.meta | 11 + .../Scripts/umamusume/Gallop/FacialMorph.cs | 2 +- Packages/packages-lock.json | 24 +-- 9 files changed, 213 insertions(+), 358 deletions(-) create mode 100644 Assets/Scripts/umamusume/Gallop/FaceEmotionKeyTarget.cs create mode 100644 Assets/Scripts/umamusume/Gallop/FaceEmotionKeyTarget.cs.meta diff --git a/Assets/Scripts/UmaContainer.cs b/Assets/Scripts/UmaContainer.cs index 1ae9f71..d0ec357 100644 --- a/Assets/Scripts/UmaContainer.cs +++ b/Assets/Scripts/UmaContainer.cs @@ -21,8 +21,8 @@ public class UmaContainer : MonoBehaviour [Header("Face")] public List FacialClips = new List(); - public FaceDrivenKeyTarget FaceDrivenKeyTargets; - public List FaceEmotionKey; + public FaceDrivenKeyTarget FaceDrivenKeyTarget; + public FaceEmotionKeyTarget FaceEmotionKeyTarget; [Header("Generic")] public bool IsGeneric = false; @@ -33,16 +33,6 @@ public class UmaContainer : MonoBehaviour public bool IsMini = false; public List MiniHeadTextures = new List(); - public void OnDestroy() - { - if (TryGetComponent(out PuppetMaster t)) - { - Destroy(this); - } - else { Destroy(gameObject); } - - } - public void MergeModel() { if (!Body) return; @@ -94,7 +84,7 @@ public class UmaContainer : MonoBehaviour UmaAnimator = gameObject.AddComponent(); UmaAnimator.avatar = AvatarBuilder.BuildGenericAvatar(gameObject, gameObject.name); UmaAnimator.runtimeAnimatorController = OverrideController = Instantiate(UmaViewerBuilder.Instance.OverrideController); - + } public Transform[] MergeBone(SkinnedMeshRenderer from, List targetBones) @@ -123,71 +113,16 @@ public class UmaContainer : MonoBehaviour } } from.bones = tmpBone; - return emptyBones.ToArray() ; + return emptyBones.ToArray(); } public void LoadPhysics() { - var springs = PhysicsController.GetComponentsInChildren(); + var springs = PhysicsController.GetComponentsInChildren(); foreach (CySpringDataContainer spring in springs) { spring.InitializePhysics(); } } - private void Update() - { - if(FaceDrivenKeyTargets != null) - { - if (FaceDrivenKeyTargets.needUpdate) - { - FaceDrivenKeyTargets.ChangeMorph(); - FaceDrivenKeyTargets.needUpdate = false; - } - if (FaceDrivenKeyTargets.needAllUpdate) - { - FaceDrivenKeyTargets.ClearMorph(); - foreach(var emotion in FaceEmotionKey) - { - if(emotion.mouthTarget != null) - { - foreach (var key in emotion.mouthTarget) - { - key.morph.Weight += key.weight / 100 * emotion.Weight; - } - } - if (emotion.eyeLTarget != null) - { - foreach (var key in emotion.eyeLTarget) - { - key.morph.Weight += key.weight / 100 * emotion.Weight; - } - } - if (emotion.eyeRTarget != null) - { - foreach (var key in emotion.eyeRTarget) - { - key.morph.Weight += key.weight / 100 * emotion.Weight; - } - } - if (emotion.eyebrowLTarget != null) - { - foreach (var key in emotion.eyeRTarget) - { - key.morph.Weight += key.weight / 100 * emotion.Weight; - } - } - if (emotion.eyebrowRTarget != null) - { - foreach (var key in emotion.eyeRTarget) - { - key.morph.Weight += key.weight / 100 * emotion.Weight; - } - } - } - FaceDrivenKeyTargets.ChangeMorph(); - FaceDrivenKeyTargets.needAllUpdate = false; - } - } - } } diff --git a/Assets/Scripts/UmaDatabase/UmaDataTypes.cs b/Assets/Scripts/UmaDatabase/UmaDataTypes.cs index 3585d87..2f777bb 100644 --- a/Assets/Scripts/UmaDatabase/UmaDataTypes.cs +++ b/Assets/Scripts/UmaDatabase/UmaDataTypes.cs @@ -44,7 +44,7 @@ public class FaceTypeData public string label, eyebrow_l, eyebrow_r, eye_l, eye_r, mouth, inverce_face_type; public int mouth_shape_type, set_face_group; - public FaceDrivenKeyTarget target; + public FaceEmotionKeyTarget target; public List mouthTarget; public List eyeLTarget; @@ -62,7 +62,7 @@ public class FaceTypeData set { _weight = value; - target.needAllUpdate = true; + target.UpdateAllFacialKeyTargets(); } } } diff --git a/Assets/Scripts/UmaViewerBuilder.cs b/Assets/Scripts/UmaViewerBuilder.cs index 3bb1ea4..12f5f9b 100644 --- a/Assets/Scripts/UmaViewerBuilder.cs +++ b/Assets/Scripts/UmaViewerBuilder.cs @@ -177,7 +177,7 @@ public class UmaViewerBuilder : MonoBehaviour int head_id; string head_costumeId; int tailId = (int)charaData["tailModelId"]; - + //The tailId of 9006 is 1, but the character has no tail if (id == 9006) tailId = -1; @@ -192,10 +192,12 @@ public class UmaViewerBuilder : MonoBehaviour head_id = id; head_costumeId = costumeId; - CurrentHead = new UmaHeadData(); - CurrentHead.id = id; - CurrentHead.costumeId = costumeId; - CurrentHead.tailId = tailId; + CurrentHead = new UmaHeadData + { + id = id, + costumeId = costumeId, + tailId = tailId + }; } string head = UmaDatabaseController.HeadPath + $"chr{head_id}_{head_costumeId}/pfb_chr{head_id}_{head_costumeId}"; @@ -237,7 +239,7 @@ public class UmaViewerBuilder : MonoBehaviour } } - + if (tailId != 0) { string tailName = $"tail{tailId.ToString().PadLeft(4, '0')}_00"; @@ -271,10 +273,16 @@ public class UmaViewerBuilder : MonoBehaviour { var firsehead = CurrentUMAContainer.Head; var FaceDriven = firsehead.GetComponent()._assetTable.list.Find(a => { return a.Key == "facial_target"; }).Value as FaceDrivenKeyTarget; - CurrentUMAContainer.FaceDrivenKeyTargets = FaceDriven; - CurrentUMAContainer.FaceEmotionKey = UmaDatabaseController.Instance.FaceTypeData.ToList(); - CurrentUMAContainer.FaceDrivenKeyTargets.Container = CurrentUMAContainer; + CurrentUMAContainer.FaceDrivenKeyTarget = FaceDriven; + CurrentUMAContainer.FaceDrivenKeyTarget.Container = CurrentUMAContainer; FaceDriven.Initialize(firsehead.GetComponentsInChildren().ToList()); + + CurrentUMAContainer.FaceEmotionKeyTarget = new FaceEmotionKeyTarget() + { + FaceDrivenKeyTarget = FaceDriven, + FaceEmotionKey = UmaDatabaseController.Instance.FaceTypeData.ToList() + }; + CurrentUMAContainer.FaceEmotionKeyTarget.Initialize(); } CurrentUMAContainer.MergeModel(); @@ -389,7 +397,7 @@ public class UmaViewerBuilder : MonoBehaviour { var asset = UmaViewerMain.Instance.AbList.FirstOrDefault(a => a.Name.EndsWith("cutt_son" + live.MusicId)); var BGasset = UmaViewerMain.Instance.AbList.FirstOrDefault(a => a.Name.EndsWith($"pfb_env_live{live.BackGroundId}_controller000")); - if (asset == null|| BGasset == null) return; + if (asset == null || BGasset == null) return; UnloadLive(); UnloadAllBundle(); @@ -509,7 +517,7 @@ public class UmaViewerBuilder : MonoBehaviour int sampleRate = stream.WaveFormat.SampleRate; AudioClip clip = AudioClip.Create( - Path.GetFileNameWithoutExtension(awb.Name)+"_"+wave.WaveId.ToString(), + Path.GetFileNameWithoutExtension(awb.Name) + "_" + wave.WaveId.ToString(), (int)(stream.Length / channels / bytesPerSample), channels, sampleRate, @@ -545,11 +553,11 @@ public class UmaViewerBuilder : MonoBehaviour bundle = AssetBundle.LoadFromFile(filePath); Main.LoadedBundles.Add(lyricsAsset.Name, bundle); } - + TextAsset asset = bundle.LoadAsset(Path.GetFileNameWithoutExtension(lyricsVar)); string[] lines = asset.text.Split("\n"[0]); - for (int i = 1; i < lines.Length; i++) + for (int i = 1; i < lines.Length; i++) { string[] words = lines[i].Split(','); if (words.Length > 0) @@ -563,13 +571,13 @@ public class UmaViewerBuilder : MonoBehaviour }; CurrentLyrics.Add(lyricsData); } - catch{} + catch { } } } } } } - + private void RecursiveLoadAsset(UmaDatabaseEntry entry, bool IsSubAsset = false) { if (!string.IsNullOrEmpty(entry.Prerequisites)) @@ -806,7 +814,7 @@ public class UmaViewerBuilder : MonoBehaviour private void LoadHead(GameObject go) { GameObject head = Instantiate(go, CurrentUMAContainer.transform); - CurrentUMAContainer.Head=head; + CurrentUMAContainer.Head = head; foreach (Renderer r in head.GetComponentsInChildren()) { @@ -935,11 +943,11 @@ public class UmaViewerBuilder : MonoBehaviour RecursiveLoadAsset(motion_e); RecursiveLoadAsset(motion_s); } - + var lastTime = CurrentUMAContainer.UmaAnimator.GetCurrentAnimatorStateInfo(0).normalizedTime; CurrentUMAContainer.OverrideController["clip_1"] = CurrentUMAContainer.OverrideController["clip_2"]; CurrentUMAContainer.OverrideController["clip_2"] = clip; - + CurrentUMAContainer.UmaAnimator.Play("motion_1", -1); CurrentUMAContainer.UmaAnimator.SetTrigger(needTransit ? "next_s" : "next"); } @@ -1011,7 +1019,7 @@ public class UmaViewerBuilder : MonoBehaviour public void UnloadProp() { - if(CurrentOtherContainer != null) + if (CurrentOtherContainer != null) { Destroy(CurrentOtherContainer.gameObject); } @@ -1029,7 +1037,7 @@ public class UmaViewerBuilder : MonoBehaviour if (CurrentUMAContainer != null) { //It seems that OnDestroy will executed after new model loaded, which cause new FacialPanels empty... - UmaViewerUI.Instance.currentMorph = null; + UmaViewerUI.Instance.currentFaceDrivenKeyTarget = null; UmaViewerUI.Instance.LoadEmotionPanels(null); UmaViewerUI.Instance.LoadFacialPanels(null); Destroy(CurrentUMAContainer.gameObject); diff --git a/Assets/Scripts/UmaViewerUI.cs b/Assets/Scripts/UmaViewerUI.cs index e8f863f..6310e45 100644 --- a/Assets/Scripts/UmaViewerUI.cs +++ b/Assets/Scripts/UmaViewerUI.cs @@ -79,7 +79,7 @@ public class UmaViewerUI : MonoBehaviour public bool isCriware = false; public bool isHeadFix = false; - public FaceDrivenKeyTarget currentMorph; + public FaceDrivenKeyTarget currentFaceDrivenKeyTarget; private void Awake() { @@ -168,10 +168,13 @@ public class UmaViewerUI : MonoBehaviour public void LoadFacialPanels(FaceDrivenKeyTarget target) { + currentFaceDrivenKeyTarget = target; + foreach (UmaUIContainer ui in FacialList.content.GetComponentsInChildren()) { Destroy(ui.gameObject); } + if (target == null) return; List tempMorph = new List(); tempMorph.AddRange(target.EyeBrowMorphs); @@ -190,10 +193,10 @@ public class UmaViewerUI : MonoBehaviour public void UpdateFacialPanels() { - LoadFacialPanels(currentMorph); + LoadFacialPanels(currentFaceDrivenKeyTarget); } - public void LoadEmotionPanels(FaceDrivenKeyTarget target) + public void LoadEmotionPanels(FaceEmotionKeyTarget target) { foreach (UmaUIContainer ui in EmotionList.content.GetComponentsInChildren()) { @@ -202,191 +205,12 @@ public class UmaViewerUI : MonoBehaviour if (target == null) return; - foreach(var emotion in target.Container.FaceEmotionKey) + foreach(var emotion in target.FaceEmotionKey) { - if(emotion.label == "Base") + if (emotion.label == "Base") { continue; } - - emotion.target = target; - - emotion.mouthTarget = new List(); - foreach(var morphName in emotion.mouth.Split('|')) - { - EmotionKey newValue = new EmotionKey(); - if (morphName.Contains("__")) - { - var splitArray = Regex.Split(morphName, "__", RegexOptions.IgnoreCase); - if(splitArray[0] == "Base") - { - continue; - } - else - { - newValue.morph = target.MouthMorphs.Where(a => a.tag == splitArray[0]).First(); - } - newValue.weight = Convert.ToInt32(splitArray[1]); - UnityEngine.Debug.Log(newValue.weight); - emotion.mouthTarget.Add(newValue); - } - else - { - UnityEngine.Debug.Log(morphName); - if (morphName == "Base") - { - continue; - } - else - { - newValue.morph = target.MouthMorphs.Where(a => a.tag == morphName).First(); - } - newValue.weight = 100; - emotion.mouthTarget.Add(newValue); - } - } - - emotion.eyeLTarget = new List(); - foreach (var morphName in emotion.eye_l.Split('|')) - { - EmotionKey newValue = new EmotionKey(); - if (morphName.Contains("__")) - { - var splitArray = Regex.Split(morphName, "__", RegexOptions.IgnoreCase); - if (splitArray[0] == "Base") - { - continue; - } - else - { - newValue.morph = target.EyeMorphs.Where(a => a.tag == splitArray[0] && a.direction == true).First(); - } - newValue.weight = Convert.ToInt32(splitArray[1]); - UnityEngine.Debug.Log(newValue.weight); - emotion.mouthTarget.Add(newValue); - } - else - { - UnityEngine.Debug.Log(morphName); - if (morphName == "Base") - { - continue; - } - else - { - newValue.morph = target.EyeMorphs.Where(a => a.tag == morphName && a.direction == true).First(); - } - newValue.weight = 100; - emotion.mouthTarget.Add(newValue); - } - } - - emotion.eyeRTarget = new List(); - foreach (var morphName in emotion.eye_r.Split('|')) - { - EmotionKey newValue = new EmotionKey(); - if (morphName.Contains("__")) - { - var splitArray = Regex.Split(morphName, "__", RegexOptions.IgnoreCase); - if (splitArray[0] == "Base") - { - continue; - } - else - { - newValue.morph = target.EyeMorphs.Where(a => a.tag == splitArray[0] && a.direction == false).First(); - } - newValue.weight = Convert.ToInt32(splitArray[1]); - UnityEngine.Debug.Log(newValue.weight); - emotion.mouthTarget.Add(newValue); - } - else - { - UnityEngine.Debug.Log(morphName); - if (morphName == "Base") - { - continue; - } - else - { - newValue.morph = target.EyeMorphs.Where(a => a.tag == morphName && a.direction == false).First(); - } - newValue.weight = 100; - emotion.mouthTarget.Add(newValue); - } - } - - emotion.eyebrowLTarget = new List(); - foreach (var morphName in emotion.eyebrow_l.Split('|')) - { - EmotionKey newValue = new EmotionKey(); - if (morphName.Contains("__")) - { - var splitArray = Regex.Split(morphName, "__", RegexOptions.IgnoreCase); - if (splitArray[0] == "Base") - { - continue; - } - else - { - newValue.morph = target.EyeBrowMorphs.Where(a => a.tag == splitArray[0] && a.direction == true).First(); - } - newValue.weight = Convert.ToInt32(splitArray[1]); - UnityEngine.Debug.Log(newValue.weight); - emotion.mouthTarget.Add(newValue); - } - else - { - UnityEngine.Debug.Log(morphName); - if (morphName == "Base") - { - continue; - } - else - { - newValue.morph = target.EyeBrowMorphs.Where(a => a.tag == morphName && a.direction == true).First(); - } - newValue.weight = 100; - emotion.mouthTarget.Add(newValue); - } - } - - emotion.eyebrowRTarget = new List(); - foreach (var morphName in emotion.eyebrow_r.Split('|')) - { - EmotionKey newValue = new EmotionKey(); - if (morphName.Contains("__")) - { - var splitArray = Regex.Split(morphName, "__", RegexOptions.IgnoreCase); - if (splitArray[0] == "Base") - { - continue; - } - else - { - newValue.morph = target.EyeBrowMorphs.Where(a => a.tag == splitArray[0] && a.direction == false).First(); - } - newValue.weight = Convert.ToInt32(splitArray[1]); - UnityEngine.Debug.Log(newValue.weight); - emotion.mouthTarget.Add(newValue); - } - else - { - UnityEngine.Debug.Log(morphName); - if (morphName == "Base") - { - continue; - } - else - { - newValue.morph = target.EyeBrowMorphs.Where(a => a.tag == morphName && a.direction == false).First(); - } - newValue.weight = 100; - emotion.mouthTarget.Add(newValue); - } - } - - var container = Instantiate(UmaContainerSliderPrefab, EmotionList.content).GetComponent(); container.Name.text = emotion.label; container.Slider.value = emotion.Weight; diff --git a/Assets/Scripts/umamusume/Gallop/FaceDrivenKeyTarget.cs b/Assets/Scripts/umamusume/Gallop/FaceDrivenKeyTarget.cs index f757c99..cb9500e 100644 --- a/Assets/Scripts/umamusume/Gallop/FaceDrivenKeyTarget.cs +++ b/Assets/Scripts/umamusume/Gallop/FaceDrivenKeyTarget.cs @@ -107,25 +107,26 @@ namespace Gallop } } } - FacialReset(); + FacialResetAll(); MouthMorphs[3].Weight = 1; - if (UmaViewerUI.Instance) { UmaViewerUI.Instance.LoadFacialPanels(this); } - if (UmaViewerUI.Instance) { UmaViewerUI.Instance.LoadEmotionPanels(this); } - if (UmaViewerUI.Instance) { UmaViewerUI.Instance.currentMorph = this; } + if (UmaViewerUI.Instance) + { + UmaViewerUI.Instance.LoadFacialPanels(this); + } } - + public void ChangeMorph() { - FacialReset(); + FacialResetAll(); foreach (FacialMorph morph in EyeBrowMorphs) { - ProcessMorph(morph); + ProcessMorph(morph); } foreach (FacialMorph morph in EyeMorphs) { - ProcessMorph(morph); + ProcessMorph(morph); } foreach (FacialMorph morph in MouthMorphs) @@ -167,76 +168,37 @@ namespace Gallop } } - public void FacialReset() + public void FacialResetAll() { - foreach (TrsArray trs in BaseLEyeBrowMorph.trsArray) - { - if (trs.transform) - { - - trs.transform.localPosition = trs._position; - trs.transform.localScale = trs._scale; - RotationRecorder[trs.transform] = trs._rotation; - }; - } - - foreach (TrsArray trs in BaseREyeBrowMorph.trsArray) - { - if (trs.transform) - { - trs.transform.localPosition = trs._position; - trs.transform.localScale = trs._scale; - RotationRecorder[trs.transform] = trs._rotation; - }; - } - - foreach (TrsArray trs in BaseLEyeMorph.trsArray) - { - if (trs.transform) - { - trs.transform.localPosition = trs._position; - trs.transform.localScale = trs._scale; - RotationRecorder[trs.transform] = trs._rotation; - }; - } - - foreach (TrsArray trs in BaseREyeMorph.trsArray) - { - if (trs.transform) - { - trs.transform.localPosition = trs._position; - trs.transform.localScale = trs._scale; - RotationRecorder[trs.transform] = trs._rotation; - }; - } - - foreach (TrsArray trs in BaseMouthMorph.trsArray) - { - if (trs.transform) - { - - trs.transform.localPosition = trs._position; - trs.transform.localScale = trs._scale; - RotationRecorder[trs.transform] = trs._rotation; - }; - } - + FacialReset(BaseLEyeBrowMorph.trsArray); + FacialReset(BaseREyeBrowMorph.trsArray); + FacialReset(BaseLEyeMorph.trsArray); + FacialReset(BaseREyeMorph.trsArray); + FacialReset(BaseMouthMorph.trsArray); ApplyRotation(); } - public void ApplyRotation(){ + public void FacialReset(List trsArrays) + { + foreach (TrsArray trs in trsArrays) + { + if (trs.transform) + { + trs.transform.localPosition = trs._position; + trs.transform.localScale = trs._scale; + RotationRecorder[trs.transform] = trs._rotation; + }; + } + } + + public void ApplyRotation() + { foreach (var trs in RotationRecorder) { trs.Key.localRotation = RotationConvert.fromMaya(trs.Value); } } - - - -} - - - + } } diff --git a/Assets/Scripts/umamusume/Gallop/FaceEmotionKeyTarget.cs b/Assets/Scripts/umamusume/Gallop/FaceEmotionKeyTarget.cs new file mode 100644 index 0000000..049c279 --- /dev/null +++ b/Assets/Scripts/umamusume/Gallop/FaceEmotionKeyTarget.cs @@ -0,0 +1,115 @@ +using Gallop; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text.RegularExpressions; +using UnityEngine; + +public class FaceEmotionKeyTarget : ScriptableObject +{ + public List FaceEmotionKey; + public FaceDrivenKeyTarget FaceDrivenKeyTarget; + + public void Initialize() + { + foreach (var emotion in FaceEmotionKey) + { + if (emotion.label == "Base") continue; + emotion.target = this; + + InitializeEmotionTarget(ref emotion.mouthTarget,ref emotion.mouthTarget, FaceDrivenKeyTarget.MouthMorphs, emotion.mouth, false); + InitializeEmotionTarget(ref emotion.eyeLTarget, ref emotion.eyeLTarget, FaceDrivenKeyTarget.EyeMorphs, emotion.eye_l, true); + InitializeEmotionTarget(ref emotion.eyeRTarget, ref emotion.eyeRTarget, FaceDrivenKeyTarget.EyeMorphs, emotion.eye_r, false); + InitializeEmotionTarget(ref emotion.eyebrowLTarget, ref emotion.eyebrowLTarget, FaceDrivenKeyTarget.EyeBrowMorphs, emotion.eyebrow_l, true); + InitializeEmotionTarget(ref emotion.eyebrowRTarget, ref emotion.eyebrowRTarget, FaceDrivenKeyTarget.EyeBrowMorphs, emotion.eyebrow_r, false); + } + + if (UmaViewerUI.Instance) + { + UmaViewerUI.Instance.LoadEmotionPanels(this); + } + } + + private void InitializeEmotionTarget(ref List targets, ref List emotionKeys,List morphs,string tags,bool direction) + { + targets = new List(); + foreach (var morphName in tags.Split('|')) + { + EmotionKey newValue = new EmotionKey(); + if (morphName.Contains("__")) + { + var splitArray = Regex.Split(morphName, "__", RegexOptions.IgnoreCase); + if (splitArray[0] == "Base") + { + continue; + } + else + { + newValue.morph = morphs.Where(a => a.tag == splitArray[0] && a.direction == direction).First(); + } + newValue.weight = Convert.ToInt32(splitArray[1]); + emotionKeys.Add(newValue); + Debug.Log(newValue.weight); + } + else + { + if (morphName == "Base") + { + continue; + } + else + { + newValue.morph = morphs.Where(a => a.tag == morphName && a.direction == direction).First(); + } + newValue.weight = 100; + emotionKeys.Add(newValue); + Debug.Log(morphName); + } + } + } + + public void UpdateAllFacialKeyTargets() + { + if (FaceDrivenKeyTarget == null) return; + FaceDrivenKeyTarget.ClearMorph(); + foreach (var emotion in FaceEmotionKey) + { + if (emotion.mouthTarget != null) + { + foreach (var key in emotion.mouthTarget) + { + key.morph.Weight += key.weight / 100 * emotion.Weight; + } + } + if (emotion.eyeLTarget != null) + { + foreach (var key in emotion.eyeLTarget) + { + key.morph.Weight += key.weight / 100 * emotion.Weight; + } + } + if (emotion.eyeRTarget != null) + { + foreach (var key in emotion.eyeRTarget) + { + key.morph.Weight += key.weight / 100 * emotion.Weight; + } + } + if (emotion.eyebrowLTarget != null) + { + foreach (var key in emotion.eyeRTarget) + { + key.morph.Weight += key.weight / 100 * emotion.Weight; + } + } + if (emotion.eyebrowRTarget != null) + { + foreach (var key in emotion.eyeRTarget) + { + key.morph.Weight += key.weight / 100 * emotion.Weight; + } + } + } + } +} + diff --git a/Assets/Scripts/umamusume/Gallop/FaceEmotionKeyTarget.cs.meta b/Assets/Scripts/umamusume/Gallop/FaceEmotionKeyTarget.cs.meta new file mode 100644 index 0000000..06a7fca --- /dev/null +++ b/Assets/Scripts/umamusume/Gallop/FaceEmotionKeyTarget.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 43ba40a9c767e6e43a635ce59cb7942e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/umamusume/Gallop/FacialMorph.cs b/Assets/Scripts/umamusume/Gallop/FacialMorph.cs index f5b443b..5b6e429 100644 --- a/Assets/Scripts/umamusume/Gallop/FacialMorph.cs +++ b/Assets/Scripts/umamusume/Gallop/FacialMorph.cs @@ -24,7 +24,7 @@ namespace Gallop set { _weight = value; - target.needUpdate = true; + target.ChangeMorph(); } } public List trsArray; diff --git a/Packages/packages-lock.json b/Packages/packages-lock.json index 1ebb68e..99b6b22 100644 --- a/Packages/packages-lock.json +++ b/Packages/packages-lock.json @@ -5,7 +5,7 @@ "depth": 1, "source": "registry", "dependencies": {}, - "url": "https://packages.unity.cn" + "url": "https://packages.unity.com" }, "com.unity.assetbundlebrowser": { "version": "https://github.com/Unity-Technologies/AssetBundles-Browser.git", @@ -21,14 +21,14 @@ "dependencies": { "com.unity.services.core": "1.0.1" }, - "url": "https://packages.unity.cn" + "url": "https://packages.unity.com" }, "com.unity.ext.nunit": { "version": "1.0.6", "depth": 1, "source": "registry", "dependencies": {}, - "url": "https://packages.unity.cn" + "url": "https://packages.unity.com" }, "com.unity.formats.fbx": { "version": "4.1.2", @@ -38,7 +38,7 @@ "com.unity.timeline": "1.5.2", "com.autodesk.fbx": "4.1.1" }, - "url": "https://packages.unity.cn" + "url": "https://packages.unity.com" }, "com.unity.ide.rider": { "version": "2.0.7", @@ -47,7 +47,7 @@ "dependencies": { "com.unity.test-framework": "1.1.1" }, - "url": "https://packages.unity.cn" + "url": "https://packages.unity.com" }, "com.unity.ide.visualstudio": { "version": "2.0.16", @@ -56,14 +56,14 @@ "dependencies": { "com.unity.test-framework": "1.1.9" }, - "url": "https://packages.unity.cn" + "url": "https://packages.unity.com" }, "com.unity.ide.vscode": { "version": "1.2.5", "depth": 0, "source": "registry", "dependencies": {}, - "url": "https://packages.unity.cn" + "url": "https://packages.unity.com" }, "com.unity.postprocessing": { "version": "3.2.2", @@ -72,7 +72,7 @@ "dependencies": { "com.unity.modules.physics": "1.0.0" }, - "url": "https://packages.unity.cn" + "url": "https://packages.unity.com" }, "com.unity.services.core": { "version": "1.0.1", @@ -81,7 +81,7 @@ "dependencies": { "com.unity.modules.unitywebrequest": "1.0.0" }, - "url": "https://packages.unity.cn" + "url": "https://packages.unity.com" }, "com.unity.test-framework": { "version": "1.1.31", @@ -92,7 +92,7 @@ "com.unity.modules.imgui": "1.0.0", "com.unity.modules.jsonserialize": "1.0.0" }, - "url": "https://packages.unity.cn" + "url": "https://packages.unity.com" }, "com.unity.textmeshpro": { "version": "3.0.6", @@ -101,7 +101,7 @@ "dependencies": { "com.unity.ugui": "1.0.0" }, - "url": "https://packages.unity.cn" + "url": "https://packages.unity.com" }, "com.unity.timeline": { "version": "1.5.2", @@ -113,7 +113,7 @@ "com.unity.modules.audio": "1.0.0", "com.unity.modules.particlesystem": "1.0.0" }, - "url": "https://packages.unity.cn" + "url": "https://packages.unity.com" }, "com.unity.ugui": { "version": "1.0.0", From bdeb68b02988da871a29c2dfb3885873be9aae8b Mon Sep 17 00:00:00 2001 From: CroakFang <1605296300@qq.com> Date: Tue, 1 Nov 2022 22:53:52 +0800 Subject: [PATCH 06/10] optimize performance --- Assets/Scripts/UmaDatabase/UmaDataTypes.cs | 7 +-- Assets/Scripts/UmaViewerUI.cs | 2 +- .../umamusume/Gallop/FaceDrivenKeyTarget.cs | 19 +++++- .../umamusume/Gallop/FaceEmotionKeyTarget.cs | 62 +++++++------------ .../Scripts/umamusume/Gallop/FacialMorph.cs | 1 - 5 files changed, 42 insertions(+), 49 deletions(-) diff --git a/Assets/Scripts/UmaDatabase/UmaDataTypes.cs b/Assets/Scripts/UmaDatabase/UmaDataTypes.cs index 2f777bb..632db93 100644 --- a/Assets/Scripts/UmaDatabase/UmaDataTypes.cs +++ b/Assets/Scripts/UmaDatabase/UmaDataTypes.cs @@ -32,6 +32,7 @@ public class UmaLyricsData public string text; } +[System.Serializable] public class EmotionKey { public FacialMorph morph; @@ -46,11 +47,7 @@ public class FaceTypeData public FaceEmotionKeyTarget target; - public List mouthTarget; - public List eyeLTarget; - public List eyeRTarget; - public List eyebrowLTarget; - public List eyebrowRTarget; + public List emotionKeys; private float _weight; public float Weight diff --git a/Assets/Scripts/UmaViewerUI.cs b/Assets/Scripts/UmaViewerUI.cs index 6310e45..2d9d28e 100644 --- a/Assets/Scripts/UmaViewerUI.cs +++ b/Assets/Scripts/UmaViewerUI.cs @@ -187,7 +187,7 @@ public class UmaViewerUI : MonoBehaviour container.Slider.value = morph.Weight; container.Slider.maxValue = 1; container.Slider.minValue = 0; - container.Slider.onValueChanged.AddListener((a) => { morph.Weight = a;}); + container.Slider.onValueChanged.AddListener((a) => { target.ChangeMorphWeight(morph, a); }); } } diff --git a/Assets/Scripts/umamusume/Gallop/FaceDrivenKeyTarget.cs b/Assets/Scripts/umamusume/Gallop/FaceDrivenKeyTarget.cs index cb9500e..ac7f586 100644 --- a/Assets/Scripts/umamusume/Gallop/FaceDrivenKeyTarget.cs +++ b/Assets/Scripts/umamusume/Gallop/FaceDrivenKeyTarget.cs @@ -108,7 +108,8 @@ namespace Gallop } } FacialResetAll(); - MouthMorphs[3].Weight = 1; + ChangeMorphWeight(MouthMorphs[3], 1); + if (UmaViewerUI.Instance) { UmaViewerUI.Instance.LoadFacialPanels(this); @@ -153,6 +154,7 @@ namespace Gallop { morph._weight = 0; } + ChangeMorph(); } private void ProcessMorph(FacialMorph morph) @@ -198,6 +200,21 @@ namespace Gallop trs.Key.localRotation = RotationConvert.fromMaya(trs.Value); } } + + public void ChangeMorphWeight(FacialMorph morph,float val) + { + morph.Weight = val; + ChangeMorph(); + } + + public void ChangeMorphWeights(Dictionary morphs) + { + foreach(var item in morphs) + { + item.Key.Weight = item.Value; + } + ChangeMorph(); + } } } diff --git a/Assets/Scripts/umamusume/Gallop/FaceEmotionKeyTarget.cs b/Assets/Scripts/umamusume/Gallop/FaceEmotionKeyTarget.cs index 049c279..01a823b 100644 --- a/Assets/Scripts/umamusume/Gallop/FaceEmotionKeyTarget.cs +++ b/Assets/Scripts/umamusume/Gallop/FaceEmotionKeyTarget.cs @@ -16,12 +16,12 @@ public class FaceEmotionKeyTarget : ScriptableObject { if (emotion.label == "Base") continue; emotion.target = this; - - InitializeEmotionTarget(ref emotion.mouthTarget,ref emotion.mouthTarget, FaceDrivenKeyTarget.MouthMorphs, emotion.mouth, false); - InitializeEmotionTarget(ref emotion.eyeLTarget, ref emotion.eyeLTarget, FaceDrivenKeyTarget.EyeMorphs, emotion.eye_l, true); - InitializeEmotionTarget(ref emotion.eyeRTarget, ref emotion.eyeRTarget, FaceDrivenKeyTarget.EyeMorphs, emotion.eye_r, false); - InitializeEmotionTarget(ref emotion.eyebrowLTarget, ref emotion.eyebrowLTarget, FaceDrivenKeyTarget.EyeBrowMorphs, emotion.eyebrow_l, true); - InitializeEmotionTarget(ref emotion.eyebrowRTarget, ref emotion.eyebrowRTarget, FaceDrivenKeyTarget.EyeBrowMorphs, emotion.eyebrow_r, false); + emotion.emotionKeys = new List(); + InitializeEmotionTarget(emotion,FaceDrivenKeyTarget.MouthMorphs, emotion.mouth, false); + InitializeEmotionTarget(emotion, FaceDrivenKeyTarget.EyeMorphs, emotion.eye_l, true); + InitializeEmotionTarget(emotion, FaceDrivenKeyTarget.EyeMorphs, emotion.eye_r, false); + InitializeEmotionTarget(emotion, FaceDrivenKeyTarget.EyeBrowMorphs, emotion.eyebrow_l, true); + InitializeEmotionTarget(emotion, FaceDrivenKeyTarget.EyeBrowMorphs, emotion.eyebrow_r, false); } if (UmaViewerUI.Instance) @@ -30,9 +30,8 @@ public class FaceEmotionKeyTarget : ScriptableObject } } - private void InitializeEmotionTarget(ref List targets, ref List emotionKeys,List morphs,string tags,bool direction) + private void InitializeEmotionTarget(FaceTypeData faceTypeData, List morphs,string tags,bool direction) { - targets = new List(); foreach (var morphName in tags.Split('|')) { EmotionKey newValue = new EmotionKey(); @@ -48,7 +47,7 @@ public class FaceEmotionKeyTarget : ScriptableObject newValue.morph = morphs.Where(a => a.tag == splitArray[0] && a.direction == direction).First(); } newValue.weight = Convert.ToInt32(splitArray[1]); - emotionKeys.Add(newValue); + faceTypeData.emotionKeys.Add(newValue); Debug.Log(newValue.weight); } else @@ -62,7 +61,7 @@ public class FaceEmotionKeyTarget : ScriptableObject newValue.morph = morphs.Where(a => a.tag == morphName && a.direction == direction).First(); } newValue.weight = 100; - emotionKeys.Add(newValue); + faceTypeData.emotionKeys.Add(newValue); Debug.Log(morphName); } } @@ -72,43 +71,24 @@ public class FaceEmotionKeyTarget : ScriptableObject { if (FaceDrivenKeyTarget == null) return; FaceDrivenKeyTarget.ClearMorph(); + Dictionary morphs = new Dictionary(); foreach (var emotion in FaceEmotionKey) { - if (emotion.mouthTarget != null) + if (emotion.emotionKeys != null) { - foreach (var key in emotion.mouthTarget) + foreach (var key in emotion.emotionKeys) { - key.morph.Weight += key.weight / 100 * emotion.Weight; - } - } - if (emotion.eyeLTarget != null) - { - foreach (var key in emotion.eyeLTarget) - { - key.morph.Weight += key.weight / 100 * emotion.Weight; - } - } - if (emotion.eyeRTarget != null) - { - foreach (var key in emotion.eyeRTarget) - { - key.morph.Weight += key.weight / 100 * emotion.Weight; - } - } - if (emotion.eyebrowLTarget != null) - { - foreach (var key in emotion.eyeRTarget) - { - key.morph.Weight += key.weight / 100 * emotion.Weight; - } - } - if (emotion.eyebrowRTarget != null) - { - foreach (var key in emotion.eyeRTarget) - { - key.morph.Weight += key.weight / 100 * emotion.Weight; + if (morphs.ContainsKey(key.morph)) + { + morphs[key.morph] = key.morph.Weight + key.weight / 100 * emotion.Weight; + } + else + { + morphs.Add(key.morph, key.morph.Weight + key.weight / 100 * emotion.Weight); + } } } + FaceDrivenKeyTarget.ChangeMorphWeights(morphs); } } } diff --git a/Assets/Scripts/umamusume/Gallop/FacialMorph.cs b/Assets/Scripts/umamusume/Gallop/FacialMorph.cs index 5b6e429..d158e53 100644 --- a/Assets/Scripts/umamusume/Gallop/FacialMorph.cs +++ b/Assets/Scripts/umamusume/Gallop/FacialMorph.cs @@ -24,7 +24,6 @@ namespace Gallop set { _weight = value; - target.ChangeMorph(); } } public List trsArray; From 8e4c96dcaf787e0da884f5ef64d5e3b7c9ef5c1d Mon Sep 17 00:00:00 2001 From: CroakFang <1605296300@qq.com> Date: Tue, 1 Nov 2022 23:43:50 +0800 Subject: [PATCH 07/10] optimize performance --- .../umamusume/Gallop/FaceDrivenKeyTarget.cs | 11 +---------- .../umamusume/Gallop/FaceEmotionKeyTarget.cs | 15 +++++---------- 2 files changed, 6 insertions(+), 20 deletions(-) diff --git a/Assets/Scripts/umamusume/Gallop/FaceDrivenKeyTarget.cs b/Assets/Scripts/umamusume/Gallop/FaceDrivenKeyTarget.cs index ac7f586..5b13487 100644 --- a/Assets/Scripts/umamusume/Gallop/FaceDrivenKeyTarget.cs +++ b/Assets/Scripts/umamusume/Gallop/FaceDrivenKeyTarget.cs @@ -154,7 +154,6 @@ namespace Gallop { morph._weight = 0; } - ChangeMorph(); } private void ProcessMorph(FacialMorph morph) @@ -206,15 +205,7 @@ namespace Gallop morph.Weight = val; ChangeMorph(); } - - public void ChangeMorphWeights(Dictionary morphs) - { - foreach(var item in morphs) - { - item.Key.Weight = item.Value; - } - ChangeMorph(); - } + } } diff --git a/Assets/Scripts/umamusume/Gallop/FaceEmotionKeyTarget.cs b/Assets/Scripts/umamusume/Gallop/FaceEmotionKeyTarget.cs index 01a823b..40da659 100644 --- a/Assets/Scripts/umamusume/Gallop/FaceEmotionKeyTarget.cs +++ b/Assets/Scripts/umamusume/Gallop/FaceEmotionKeyTarget.cs @@ -71,25 +71,20 @@ public class FaceEmotionKeyTarget : ScriptableObject { if (FaceDrivenKeyTarget == null) return; FaceDrivenKeyTarget.ClearMorph(); - Dictionary morphs = new Dictionary(); + foreach (var emotion in FaceEmotionKey) { if (emotion.emotionKeys != null) { foreach (var key in emotion.emotionKeys) { - if (morphs.ContainsKey(key.morph)) - { - morphs[key.morph] = key.morph.Weight + key.weight / 100 * emotion.Weight; - } - else - { - morphs.Add(key.morph, key.morph.Weight + key.weight / 100 * emotion.Weight); - } + key.morph.Weight += key.weight / 100 * emotion.Weight; } } - FaceDrivenKeyTarget.ChangeMorphWeights(morphs); + } + + FaceDrivenKeyTarget.ChangeMorph(); } } From fafa3792c94b5d7922933e1846b5ffeb3f71a79f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B7=A6=E5=8F=B3=E7=9C=8B?= <1918891542@qq.com> Date: Wed, 2 Nov 2022 00:05:19 +0800 Subject: [PATCH 08/10] Highlight a useful setting :P --- Assets/Scenes/Version2.unity | 76 ++++++++++++++++++------------------ 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/Assets/Scenes/Version2.unity b/Assets/Scenes/Version2.unity index 55334e3..21b5b79 100644 --- a/Assets/Scenes/Version2.unity +++ b/Assets/Scenes/Version2.unity @@ -5760,7 +5760,7 @@ RectTransform: - {fileID: 292348636} - {fileID: 994851659} m_Father: {fileID: 1704906816} - m_RootOrder: 5 + m_RootOrder: 7 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} @@ -10587,7 +10587,7 @@ RectTransform: m_Children: - {fileID: 1400934330} m_Father: {fileID: 1704906816} - m_RootOrder: 6 + m_RootOrder: 8 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} @@ -12764,7 +12764,7 @@ RectTransform: m_Children: - {fileID: 1887819554} m_Father: {fileID: 1704906816} - m_RootOrder: 9 + m_RootOrder: 11 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} @@ -15636,7 +15636,7 @@ RectTransform: m_Children: - {fileID: 992041010} m_Father: {fileID: 1704906816} - m_RootOrder: 2 + m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} @@ -17752,7 +17752,7 @@ RectTransform: m_Children: - {fileID: 1085936791} m_Father: {fileID: 1704906816} - m_RootOrder: 10 + m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} @@ -19847,8 +19847,8 @@ MonoBehaviour: m_TargetGraphic: {fileID: 1882365343} m_HandleRect: {fileID: 1882365342} m_Direction: 2 - m_Value: 0 - m_Size: 1 + m_Value: 1 + m_Size: 0.97654355 m_NumberOfSteps: 0 m_OnValueChanged: m_PersistentCalls: @@ -20268,7 +20268,7 @@ RectTransform: - {fileID: 916764976} - {fileID: 1385563000} m_Father: {fileID: 1704906816} - m_RootOrder: 3 + m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} @@ -24934,7 +24934,7 @@ MonoBehaviour: UIColor2: {r: 1, g: 1, b: 1, a: 1} isCriware: 0 isHeadFix: 0 - currentMorph: {fileID: 0} + currentFaceDrivenKeyTarget: {fileID: 0} --- !u!114 &1564959568 MonoBehaviour: m_ObjectHideFlags: 0 @@ -26926,7 +26926,7 @@ RectTransform: m_Children: - {fileID: 2016037558} m_Father: {fileID: 1704906816} - m_RootOrder: 8 + m_RootOrder: 10 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} @@ -27915,6 +27915,8 @@ RectTransform: m_Children: - {fileID: 991136000} - {fileID: 6878219666121841224} + - {fileID: 1046617015} + - {fileID: 1798338064} - {fileID: 893956225} - {fileID: 1209823365} - {fileID: 2091332066} @@ -27923,8 +27925,6 @@ RectTransform: - {fileID: 1705149250} - {fileID: 1664478985} - {fileID: 753756319} - - {fileID: 1046617015} - - {fileID: 1798338064} - {fileID: 1810564998} - {fileID: 482905334} - {fileID: 1340983837} @@ -28017,7 +28017,7 @@ RectTransform: - {fileID: 1408642259} - {fileID: 1525688469} m_Father: {fileID: 1704906816} - m_RootOrder: 7 + m_RootOrder: 9 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} @@ -29213,7 +29213,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 + m_IsActive: 1 --- !u!224 &1798338064 RectTransform: m_ObjectHideFlags: 0 @@ -29227,12 +29227,12 @@ RectTransform: m_Children: - {fileID: 1364855926} m_Father: {fileID: 1704906816} - m_RootOrder: 11 + m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 283, y: -936.85} - m_SizeDelta: {x: 283, y: 50} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 50} m_Pivot: {x: 1, y: 0.5} --- !u!114 &1798338065 MonoBehaviour: @@ -33331,7 +33331,7 @@ RectTransform: m_Children: - {fileID: 1139092354} m_Father: {fileID: 1704906816} - m_RootOrder: 4 + m_RootOrder: 6 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} @@ -34978,9 +34978,9 @@ RectTransform: m_Father: {fileID: 6878219667498913896} m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 106.5, y: -345.41663} m_SizeDelta: {x: 180, y: 20} m_Pivot: {x: 0.5, y: 1} --- !u!114 &6878219665895574065 @@ -35486,9 +35486,9 @@ RectTransform: m_Father: {fileID: 6878219667498913896} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 106.5, y: -69.08333} m_SizeDelta: {x: 180, y: 20} m_Pivot: {x: 0.5, y: 1} --- !u!114 &6878219666109573094 @@ -37842,9 +37842,9 @@ RectTransform: m_Father: {fileID: 6878219667498913896} m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 106.5, y: -207.24998} m_SizeDelta: {x: 180, y: 20} m_Pivot: {x: 0.5, y: 1} --- !u!114 &6878219666841734894 @@ -38673,9 +38673,9 @@ RectTransform: m_Father: {fileID: 6878219667498913896} m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 106.5, y: -276.3333} m_SizeDelta: {x: 180, y: 20} m_Pivot: {x: 0.5, y: 1} --- !u!114 &6878219667203546886 @@ -40385,9 +40385,9 @@ RectTransform: m_Father: {fileID: 6878219667498913896} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 106.5, y: 0} m_SizeDelta: {x: 180, y: 20} m_Pivot: {x: 0.5, y: 1} --- !u!114 &6878219667749320559 @@ -40605,9 +40605,9 @@ RectTransform: m_Father: {fileID: 6878219667498913896} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 106.5, y: -138.16666} m_SizeDelta: {x: 180, y: 20} m_Pivot: {x: 0.5, y: 1} --- !u!1 &6878219667784581358 From ae640a1b4ba8e502fce29e81658a8c6bd18a62f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B7=A6=E5=8F=B3=E7=9C=8B?= <1918891542@qq.com> Date: Wed, 2 Nov 2022 00:09:33 +0800 Subject: [PATCH 09/10] update --- Assets/Scenes/Version2.unity | 38 ++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/Assets/Scenes/Version2.unity b/Assets/Scenes/Version2.unity index 21b5b79..ff5f2a2 100644 --- a/Assets/Scenes/Version2.unity +++ b/Assets/Scenes/Version2.unity @@ -31563,7 +31563,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: Change Cloth Only + m_text: Lock Character m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} @@ -34978,9 +34978,9 @@ RectTransform: m_Father: {fileID: 6878219667498913896} m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 106.5, y: -345.41663} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 180, y: 20} m_Pivot: {x: 0.5, y: 1} --- !u!114 &6878219665895574065 @@ -35486,9 +35486,9 @@ RectTransform: m_Father: {fileID: 6878219667498913896} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 106.5, y: -69.08333} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 180, y: 20} m_Pivot: {x: 0.5, y: 1} --- !u!114 &6878219666109573094 @@ -37842,9 +37842,9 @@ RectTransform: m_Father: {fileID: 6878219667498913896} m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 106.5, y: -207.24998} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 180, y: 20} m_Pivot: {x: 0.5, y: 1} --- !u!114 &6878219666841734894 @@ -38673,9 +38673,9 @@ RectTransform: m_Father: {fileID: 6878219667498913896} m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 106.5, y: -276.3333} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 180, y: 20} m_Pivot: {x: 0.5, y: 1} --- !u!114 &6878219667203546886 @@ -40385,9 +40385,9 @@ RectTransform: m_Father: {fileID: 6878219667498913896} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 106.5, y: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 180, y: 20} m_Pivot: {x: 0.5, y: 1} --- !u!114 &6878219667749320559 @@ -40605,9 +40605,9 @@ RectTransform: m_Father: {fileID: 6878219667498913896} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 106.5, y: -138.16666} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 180, y: 20} m_Pivot: {x: 0.5, y: 1} --- !u!1 &6878219667784581358 From 7c07615b8a697adf4ba3ae37618bae5c6f57d4b5 Mon Sep 17 00:00:00 2001 From: katboi01 <59540382+katboi01@users.noreply.github.com> Date: Tue, 1 Nov 2022 19:00:40 +0100 Subject: [PATCH 10/10] Added morph clear button removed redundant property --- Assets/Scenes/Version2.unity | 294 +++++++++++++++++- Assets/Scripts/UmaContainer.cs | 1 - Assets/Scripts/UmaViewerBuilder.cs | 19 ++ Assets/Scripts/UmaViewerUI.cs | 70 ++--- .../umamusume/Gallop/FaceDrivenKeyTarget.cs | 14 +- .../umamusume/Gallop/FaceEmotionKeyTarget.cs | 6 +- .../Scripts/umamusume/Gallop/FacialMorph.cs | 13 +- ProjectSettings/ProjectSettings.asset | 2 +- 8 files changed, 347 insertions(+), 72 deletions(-) diff --git a/Assets/Scenes/Version2.unity b/Assets/Scenes/Version2.unity index ff5f2a2..c178e06 100644 --- a/Assets/Scenes/Version2.unity +++ b/Assets/Scenes/Version2.unity @@ -1028,6 +1028,139 @@ RectTransform: m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &87919061 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 87919062} + - component: {fileID: 87919065} + - component: {fileID: 87919064} + - component: {fileID: 87919063} + m_Layer: 5 + m_Name: Clear + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &87919062 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 87919061} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1542859407} + m_Father: {fileID: 2059749648} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 311.66666, y: -15} + m_SizeDelta: {x: 106.666664, y: 30} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &87919063 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 87919061} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 2101350876} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1564959568} + m_TargetAssemblyTypeName: UmaViewerBuilder, umamusume + m_MethodName: ClearMorphs + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!114 &87919064 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 87919061} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.9607844, g: 0.9607844, b: 0.9607844, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &87919065 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 87919061} + m_CullTransparentMesh: 1 --- !u!1 &92965280 GameObject: m_ObjectHideFlags: 0 @@ -16947,8 +17080,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 176.66667, y: -15} - m_SizeDelta: {x: 146.66667, y: 30} + m_AnchoredPosition: {x: 180, y: -15} + m_SizeDelta: {x: 150, y: 30} m_Pivot: {x: 0, y: 0.5} --- !u!114 &994710209 MonoBehaviour: @@ -17283,8 +17416,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 176.66667, y: -15} - m_SizeDelta: {x: 146.66667, y: 30} + m_AnchoredPosition: {x: 136.66666, y: -15} + m_SizeDelta: {x: 106.666664, y: 30} m_Pivot: {x: 0, y: 0.5} --- !u!114 &1027345408 MonoBehaviour: @@ -19847,8 +19980,8 @@ MonoBehaviour: m_TargetGraphic: {fileID: 1882365343} m_HandleRect: {fileID: 1882365342} m_Direction: 2 - m_Value: 1 - m_Size: 0.97654355 + m_Value: 0 + m_Size: 1 m_NumberOfSteps: 0 m_OnValueChanged: m_PersistentCalls: @@ -21580,7 +21713,7 @@ RectTransform: m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} m_AnchoredPosition: {x: 15, y: -15} - m_SizeDelta: {x: 146.66667, y: 30} + m_SizeDelta: {x: 106.666664, y: 30} m_Pivot: {x: 0, y: 0.5} --- !u!1 &1297525976 GameObject: @@ -24708,6 +24841,140 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1537165046} m_CullTransparentMesh: 1 +--- !u!1 &1542859406 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1542859407} + - component: {fileID: 1542859409} + - component: {fileID: 1542859408} + m_Layer: 5 + m_Name: Text (TMP) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1542859407 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1542859406} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 87919062} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1542859408 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1542859406} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: Clear + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4281479730 + m_fontColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 24 + m_fontSizeBase: 24 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 512 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_enableWordWrapping: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 1 + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!222 &1542859409 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1542859406} + m_CullTransparentMesh: 1 --- !u!1 &1558324556 GameObject: m_ObjectHideFlags: 0 @@ -27461,7 +27728,7 @@ RectTransform: m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1} m_AnchoredPosition: {x: 0, y: -45} - m_SizeDelta: {x: 255, y: -90} + m_SizeDelta: {x: 380, y: -90} m_Pivot: {x: 0, y: 0.5} --- !u!114 &1684693615 MonoBehaviour: @@ -27814,7 +28081,7 @@ RectTransform: m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1} m_AnchoredPosition: {x: 0, y: -45} - m_SizeDelta: {x: 255, y: -90} + m_SizeDelta: {x: 380, y: -90} m_Pivot: {x: 0, y: 0.5} --- !u!114 &1699478760 MonoBehaviour: @@ -28229,7 +28496,7 @@ RectTransform: m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} m_AnchoredPosition: {x: 15, y: -15} - m_SizeDelta: {x: 146.66667, y: 30} + m_SizeDelta: {x: 150, y: 30} m_Pivot: {x: 0, y: 0.5} --- !u!1 &1716374325 GameObject: @@ -32985,13 +33252,14 @@ RectTransform: m_Children: - {fileID: 1296932688} - {fileID: 1027345407} + - {fileID: 87919062} m_Father: {fileID: 1339030790} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} m_AnchoredPosition: {x: 0, y: -60} - m_SizeDelta: {x: 255, y: 30} + m_SizeDelta: {x: 380, y: 30} m_Pivot: {x: 0, y: 1} --- !u!114 &2059749649 MonoBehaviour: @@ -33998,8 +34266,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 416.6667, y: -15} - m_SizeDelta: {x: 156.66667, y: 30} + m_AnchoredPosition: {x: 420, y: -15} + m_SizeDelta: {x: 150, y: 30} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &2101350875 MonoBehaviour: diff --git a/Assets/Scripts/UmaContainer.cs b/Assets/Scripts/UmaContainer.cs index d0ec357..1ca461f 100644 --- a/Assets/Scripts/UmaContainer.cs +++ b/Assets/Scripts/UmaContainer.cs @@ -20,7 +20,6 @@ public class UmaContainer : MonoBehaviour public AnimatorOverrideController OverrideController; [Header("Face")] - public List FacialClips = new List(); public FaceDrivenKeyTarget FaceDrivenKeyTarget; public FaceEmotionKeyTarget FaceEmotionKeyTarget; diff --git a/Assets/Scripts/UmaViewerBuilder.cs b/Assets/Scripts/UmaViewerBuilder.cs index 12f5f9b..8762b42 100644 --- a/Assets/Scripts/UmaViewerBuilder.cs +++ b/Assets/Scripts/UmaViewerBuilder.cs @@ -1043,4 +1043,23 @@ public class UmaViewerBuilder : MonoBehaviour Destroy(CurrentUMAContainer.gameObject); } } + + public void ClearMorphs() + { + if (CurrentUMAContainer != null && CurrentUMAContainer.FaceDrivenKeyTarget != null) + { + foreach (var container in UI.EmotionList.GetComponentsInChildren()) + { + if (container.Slider != null) + container.Slider.value = 0; + } + foreach (var container in UI.FacialList.GetComponentsInChildren()) + { + if (container.Slider != null) + container.Slider.SetValueWithoutNotify(0); + } + CurrentUMAContainer.FaceDrivenKeyTarget.ClearMorph(); + CurrentUMAContainer.FaceDrivenKeyTarget.ChangeMorph(); + } + } } diff --git a/Assets/Scripts/UmaViewerUI.cs b/Assets/Scripts/UmaViewerUI.cs index 2d9d28e..1feaca7 100644 --- a/Assets/Scripts/UmaViewerUI.cs +++ b/Assets/Scripts/UmaViewerUI.cs @@ -93,6 +93,40 @@ public class UmaViewerUI : MonoBehaviour canvasScaler.screenMatchMode = CanvasScaler.ScreenMatchMode.Shrink; } + private void Update() + { + if (Builder.CurrentAudioSources.Count > 0) + { + AudioSource MianSource = Builder.CurrentAudioSources[0]; + if (MianSource.clip) + { + TitleText.text = MianSource.clip.name; + ProgressText.text = string.Format("{0} / {1}", ToTimeFormat(MianSource.time), ToTimeFormat(MianSource.clip.length)); + AudioSlider.SetValueWithoutNotify(MianSource.time / MianSource.clip.length); + LyricsText.text = GetCurrentLyrics(MianSource.time); + } + } + + + if (Builder.CurrentUMAContainer != null && Builder.CurrentUMAContainer.OverrideController != null) + { + if (Builder.CurrentUMAContainer.OverrideController["clip_2"].name != "clip_2") + { + bool isLoop = Builder.CurrentUMAContainer.OverrideController["clip_2"].name.EndsWith("_loop"); + var AnimeState = Builder.CurrentUMAContainer.UmaAnimator.GetCurrentAnimatorStateInfo(0); + var AnimeClip = Builder.CurrentUMAContainer.OverrideController["clip_2"]; + if (AnimeClip && Builder.CurrentUMAContainer.UmaAnimator.speed != 0) + { + var normalizedTime = (isLoop) ? Mathf.Repeat(AnimeState.normalizedTime, 1) : Mathf.Min(AnimeState.normalizedTime, 1); + + AnimationTitleText.text = AnimeClip.name; + AnimationProgressText.text = string.Format("{0} / {1}", ToFrameFormat(normalizedTime * AnimeClip.length, AnimeClip.frameRate), ToFrameFormat(AnimeClip.length, AnimeClip.frameRate)); + AnimationSlider.SetValueWithoutNotify(normalizedTime); + } + } + } + } + public void HighlightChildImage(Transform mainObject, Image child) { foreach(var t in mainObject.GetComponentsInChildren()) @@ -184,7 +218,7 @@ public class UmaViewerUI : MonoBehaviour { var container = Instantiate(UmaContainerSliderPrefab, FacialList.content).GetComponent(); container.Name.text = morph.name + " (" + morph.tag + ")"; - container.Slider.value = morph.Weight; + container.Slider.value = morph.weight; container.Slider.maxValue = 1; container.Slider.minValue = 0; container.Slider.onValueChanged.AddListener((a) => { target.ChangeMorphWeight(morph, a); }); @@ -647,40 +681,6 @@ public class UmaViewerUI : MonoBehaviour Builder.CurrentUMAContainer.UmaAnimator.speed = val; } - private void Update() - { - if (Builder.CurrentAudioSources.Count > 0) - { - AudioSource MianSource = Builder.CurrentAudioSources[0]; - if (MianSource.clip) - { - TitleText.text = MianSource.clip.name; - ProgressText.text = string.Format("{0} / {1}", ToTimeFormat(MianSource.time), ToTimeFormat(MianSource.clip.length)); - AudioSlider.SetValueWithoutNotify(MianSource.time/ MianSource.clip.length); - LyricsText.text = GetCurrentLyrics(MianSource.time); - } - } - - - if (Builder.CurrentUMAContainer != null && Builder.CurrentUMAContainer.OverrideController != null) - { - if(Builder.CurrentUMAContainer.OverrideController["clip_2"].name != "clip_2") - { - bool isLoop = Builder.CurrentUMAContainer.OverrideController["clip_2"].name.EndsWith("_loop"); - var AnimeState = Builder.CurrentUMAContainer.UmaAnimator.GetCurrentAnimatorStateInfo(0); - var AnimeClip = Builder.CurrentUMAContainer.OverrideController["clip_2"]; - if (AnimeClip && Builder.CurrentUMAContainer.UmaAnimator.speed != 0) - { - var normalizedTime = (isLoop) ? Mathf.Repeat(AnimeState.normalizedTime, 1) : Mathf.Min(AnimeState.normalizedTime, 1); - - AnimationTitleText.text = AnimeClip.name; - AnimationProgressText.text = string.Format("{0} / {1}", ToFrameFormat(normalizedTime * AnimeClip.length, AnimeClip.frameRate), ToFrameFormat(AnimeClip.length, AnimeClip.frameRate)); - AnimationSlider.SetValueWithoutNotify(normalizedTime); - } - } - } - } - public void ResetAudioPlayer() { TitleText.text = "No Audio"; diff --git a/Assets/Scripts/umamusume/Gallop/FaceDrivenKeyTarget.cs b/Assets/Scripts/umamusume/Gallop/FaceDrivenKeyTarget.cs index 5b13487..643e12e 100644 --- a/Assets/Scripts/umamusume/Gallop/FaceDrivenKeyTarget.cs +++ b/Assets/Scripts/umamusume/Gallop/FaceDrivenKeyTarget.cs @@ -142,17 +142,17 @@ namespace Gallop { foreach (FacialMorph morph in EyeBrowMorphs) { - morph._weight = 0; + morph.weight = 0; } foreach (FacialMorph morph in EyeMorphs) { - morph._weight = 0; + morph.weight = 0; } foreach (FacialMorph morph in MouthMorphs) { - morph._weight = 0; + morph.weight = 0; } } @@ -162,9 +162,9 @@ namespace Gallop { if (trs.transform) { - trs.transform.localScale += trs._scale * morph.Weight; - trs.transform.localPosition += trs._position * morph.Weight; - RotationRecorder[trs.transform] += trs._rotation * morph.Weight; + trs.transform.localScale += trs._scale * morph.weight; + trs.transform.localPosition += trs._position * morph.weight; + RotationRecorder[trs.transform] += trs._rotation * morph.weight; }; } } @@ -202,7 +202,7 @@ namespace Gallop public void ChangeMorphWeight(FacialMorph morph,float val) { - morph.Weight = val; + morph.weight = val; ChangeMorph(); } diff --git a/Assets/Scripts/umamusume/Gallop/FaceEmotionKeyTarget.cs b/Assets/Scripts/umamusume/Gallop/FaceEmotionKeyTarget.cs index 40da659..961715f 100644 --- a/Assets/Scripts/umamusume/Gallop/FaceEmotionKeyTarget.cs +++ b/Assets/Scripts/umamusume/Gallop/FaceEmotionKeyTarget.cs @@ -48,7 +48,7 @@ public class FaceEmotionKeyTarget : ScriptableObject } newValue.weight = Convert.ToInt32(splitArray[1]); faceTypeData.emotionKeys.Add(newValue); - Debug.Log(newValue.weight); + //Debug.Log(newValue.weight); } else { @@ -62,7 +62,7 @@ public class FaceEmotionKeyTarget : ScriptableObject } newValue.weight = 100; faceTypeData.emotionKeys.Add(newValue); - Debug.Log(morphName); + //Debug.Log(morphName); } } } @@ -78,7 +78,7 @@ public class FaceEmotionKeyTarget : ScriptableObject { foreach (var key in emotion.emotionKeys) { - key.morph.Weight += key.weight / 100 * emotion.Weight; + key.morph.weight += key.weight / 100 * emotion.Weight; } } diff --git a/Assets/Scripts/umamusume/Gallop/FacialMorph.cs b/Assets/Scripts/umamusume/Gallop/FacialMorph.cs index d158e53..835d64a 100644 --- a/Assets/Scripts/umamusume/Gallop/FacialMorph.cs +++ b/Assets/Scripts/umamusume/Gallop/FacialMorph.cs @@ -14,18 +14,7 @@ namespace Gallop public string tag = ""; public bool direction; public FaceDrivenKeyTarget target; - public float _weight; - public float Weight - { - get - { - return _weight; - } - set - { - _weight = value; - } - } + public float weight; public List trsArray; } } diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 5e415f9..158d8d4 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -134,7 +134,7 @@ PlayerSettings: 16:10: 1 16:9: 1 Others: 1 - bundleVersion: 3.0 + bundleVersion: 2.1.1 preloadedAssets: [] metroInputSource: 0 wsaTransparentSwapchain: 0