From 070b0052160e676341c36e02879aa8b1df78dd70 Mon Sep 17 00:00:00 2001 From: CroakFang <1605296300@qq.com> Date: Mon, 28 Aug 2023 00:57:47 +0800 Subject: [PATCH] fix new live error, add live Lyrics ui --- Assets/Scenes/LiveScene.unity | 481 +++++++++++++++++- Assets/Scenes/Version2.unity | 10 +- .../Scripts/Audio/CriWareFormats/AwbReader.cs | 35 +- Assets/Scripts/LiveToolBox/LiveViewerUI.cs | 11 + Assets/Scripts/UmaContainerCharacter.cs | 37 +- Assets/Scripts/UmaDatabase/UmaDataTypes.cs | 22 +- Assets/Scripts/UmaSceneController.cs | 9 +- Assets/Scripts/UmaViewerAudio.cs | 120 +---- Assets/Scripts/UmaViewerBuilder.cs | 11 +- Assets/Scripts/UmaViewerUI.cs | 17 +- Assets/Scripts/Utility/UmaUtility.cs | 16 +- .../umamusume/Gallop/FaceDrivenKeyTarget.cs | 88 +++- .../Scripts/umamusume/Gallop/FacialMorph.cs | 1 + .../Gallop/Live/Cutt/LiveTimelineControl.cs | 16 + .../LiveTimelineFacialData.cs | 2 +- .../Scripts/umamusume/Gallop/Live/Director.cs | 20 +- 16 files changed, 698 insertions(+), 198 deletions(-) diff --git a/Assets/Scenes/LiveScene.unity b/Assets/Scenes/LiveScene.unity index ede5b29..7db8986 100644 --- a/Assets/Scenes/LiveScene.unity +++ b/Assets/Scenes/LiveScene.unity @@ -155,7 +155,7 @@ RectTransform: m_Children: - {fileID: 1107325621} m_Father: {fileID: 2146838901} - m_RootOrder: 1 + m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 0} @@ -687,6 +687,82 @@ MonoBehaviour: m_PersistentCalls: m_Calls: [] m_IsOn: 1 +--- !u!1 &491122962 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 491122963} + - component: {fileID: 491122965} + - component: {fileID: 491122964} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &491122963 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 491122962} + 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: 515633909} + m_Father: {fileID: 1174860554} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 1} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: -10} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 1, y: 0.5} +--- !u!114 &491122964 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 491122962} + 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 &491122965 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 491122962} + m_CullTransparentMesh: 1 --- !u!1 &499218591 GameObject: m_ObjectHideFlags: 0 @@ -839,6 +915,81 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 499218591} m_CullTransparentMesh: 1 +--- !u!1 &515633908 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 515633909} + - component: {fileID: 515633911} + - component: {fileID: 515633910} + m_Layer: 5 + m_Name: Checkmark + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &515633909 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 515633908} + 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: 491122963} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &515633910 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 515633908} + 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: 10901, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 0 + 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 &515633911 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 515633908} + m_CullTransparentMesh: 1 --- !u!1 &679139652 GameObject: m_ObjectHideFlags: 0 @@ -909,7 +1060,7 @@ RectTransform: - {fileID: 1281263664} - {fileID: 2051549436} m_Father: {fileID: 2146838901} - 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: 0} @@ -1585,6 +1736,104 @@ RectTransform: m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 25} m_Pivot: {x: 0.5, y: 0} +--- !u!1 &1174860553 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1174860554} + - component: {fileID: 1174860555} + m_Layer: 5 + m_Name: Lyrics + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1174860554 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1174860553} + 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: 491122963} + - {fileID: 1923247386} + m_Father: {fileID: 2051549436} + 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: 10, y: -70} + m_SizeDelta: {x: 160, y: 20} + m_Pivot: {x: 0, y: 1} +--- !u!114 &1174860555 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1174860553} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, 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: 491122964} + toggleTransition: 1 + graphic: {fileID: 515633910} + m_Group: {fileID: 0} + onValueChanged: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 2090217549} + m_TargetAssemblyTypeName: UnityEngine.GameObject, UnityEngine + m_MethodName: SetActive + m_Mode: 0 + 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_IsOn: 1 --- !u!1 &1187866528 GameObject: m_ObjectHideFlags: 0 @@ -1938,7 +2187,7 @@ MonoBehaviour: m_HorizontalOverflow: 0 m_VerticalOverflow: 0 m_LineSpacing: 1 - m_Text: "FrameRate\uFF1A" + m_Text: FrameRate --- !u!222 &1348886008 CanvasRenderer: m_ObjectHideFlags: 0 @@ -2641,6 +2890,101 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1721556089} m_CullTransparentMesh: 1 +--- !u!1 &1814092673 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1814092677} + - component: {fileID: 1814092676} + - component: {fileID: 1814092674} + - component: {fileID: 1814092675} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1814092674 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1814092673} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 0 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 036631af73b15ac41a9d10f75f5bbafe, type: 3} + m_FontSize: 15 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 0 + m_MaxSize: 117 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 1 + m_VerticalOverflow: 1 + m_LineSpacing: 0.6 + m_Text: +--- !u!114 &1814092675 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1814092673} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e19747de3f5aca642ab2be37e372fb86, type: 3} + m_Name: + m_EditorClassIdentifier: + m_EffectColor: {r: 0, g: 0, b: 0, a: 1} + m_EffectDistance: {x: 1, y: 1} + m_UseGraphicAlpha: 1 +--- !u!222 &1814092676 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1814092673} + m_CullTransparentMesh: 1 +--- !u!224 &1814092677 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1814092673} + 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: 2090217551} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 0} + m_AnchoredPosition: {x: 0, y: 24.93} + m_SizeDelta: {x: 0, y: 50} + m_Pivot: {x: 0.5, y: 0} --- !u!1 &1839609384 GameObject: m_ObjectHideFlags: 0 @@ -2831,6 +3175,85 @@ RectTransform: m_AnchoredPosition: {x: -7.5, y: -0.5} m_SizeDelta: {x: -35, y: -13} m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &1923247385 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1923247386} + - component: {fileID: 1923247388} + - component: {fileID: 1923247387} + m_Layer: 5 + m_Name: Label + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1923247386 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1923247385} + 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: 1174860554} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: -11.5, y: 0} + m_SizeDelta: {x: -23, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1923247387 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1923247385} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, 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_FontData: + m_Font: {fileID: 12800000, guid: 036631af73b15ac41a9d10f75f5bbafe, type: 3} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Lyrics +--- !u!222 &1923247388 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1923247385} + m_CullTransparentMesh: 1 --- !u!1 &1950769033 GameObject: m_ObjectHideFlags: 0 @@ -2861,7 +3284,7 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 2146838901} - m_RootOrder: 2 + m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 1} @@ -2974,7 +3397,7 @@ Transform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 2146838901} - m_RootOrder: 3 + m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1988617878 GameObject: @@ -3136,6 +3559,7 @@ MonoBehaviour: BottonUITransform: {fileID: 1107325621} FrameRateDropDown: {fileID: 499218592} RecordingUI: {fileID: 1950769033} + LyricsText: {fileID: 1814092674} --- !u!81 &2017920250 AudioListener: m_ObjectHideFlags: 0 @@ -3174,6 +3598,7 @@ RectTransform: m_Children: - {fileID: 2120942182} - {fileID: 1237872487} + - {fileID: 1174860554} m_Father: {fileID: 679139655} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -3208,6 +3633,51 @@ MonoBehaviour: m_ChildScaleWidth: 0 m_ChildScaleHeight: 0 m_ReverseArrangement: 0 +--- !u!1 &2090217549 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2090217551} + - component: {fileID: 2090217550} + m_Layer: 5 + m_Name: Lyrics + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!222 &2090217550 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2090217549} + m_CullTransparentMesh: 1 +--- !u!224 &2090217551 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2090217549} + 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: 1814092677} + m_Father: {fileID: 2146838901} + 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!1 &2115128459 GameObject: m_ObjectHideFlags: 0 @@ -3472,6 +3942,7 @@ RectTransform: m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 0, y: 0, z: 0} m_Children: + - {fileID: 2090217551} - {fileID: 679139655} - {fileID: 61452365} - {fileID: 1950769034} diff --git a/Assets/Scenes/Version2.unity b/Assets/Scenes/Version2.unity index 2d01e24..e159b68 100644 --- a/Assets/Scenes/Version2.unity +++ b/Assets/Scenes/Version2.unity @@ -3091,7 +3091,7 @@ MonoBehaviour: m_RichText: 1 m_HorizontalOverflow: 1 m_VerticalOverflow: 1 - m_LineSpacing: 1 + m_LineSpacing: 0.6 m_Text: --- !u!114 &123935080 MonoBehaviour: @@ -42758,14 +42758,6 @@ MonoBehaviour: TransMaterialProps: {fileID: 2100000, guid: 59dfbb3f0a697874c81bba8ff758c891, type: 2} CurrentUMAContainer: {fileID: 0} CurrentOtherContainer: {fileID: 0} - hairShader: {fileID: 0} - faceShader: {fileID: 0} - eyeShader: {fileID: 0} - cheekShader: {fileID: 0} - eyebrowShader: {fileID: 0} - alphaShader: {fileID: 0} - bodyAlphaShader: {fileID: 0} - bodyBehindAlphaShader: {fileID: 0} CurrentAudioSources: [] OverrideController: {fileID: 22100000, guid: 130057757529b0f40a4fdc08bf0861ef, type: 2} FaceOverrideController: {fileID: 22100000, guid: 21f82840716293147bcb9f4bfb58cc99, diff --git a/Assets/Scripts/Audio/CriWareFormats/AwbReader.cs b/Assets/Scripts/Audio/CriWareFormats/AwbReader.cs index 8cd828a..9db0b55 100644 --- a/Assets/Scripts/Audio/CriWareFormats/AwbReader.cs +++ b/Assets/Scripts/Audio/CriWareFormats/AwbReader.cs @@ -22,10 +22,12 @@ namespace CriWareFormats public sealed class AwbReader : IDisposable { private readonly BinaryReader binaryReader; + private readonly long offset; private readonly byte offsetSize; + private readonly ushort waveIdAlignment; private readonly int totalSubsongs; - private readonly ushort alignment; + private readonly ushort offsetAlignment; private readonly ushort subkey; private readonly List cueNames; @@ -41,40 +43,41 @@ namespace CriWareFormats public AwbReader(Stream awbStream, long positionOffset) { binaryReader = new BinaryReader(awbStream); + offset = positionOffset; - binaryReader.BaseStream.Position = positionOffset; + binaryReader.BaseStream.Position = offset; - if (!binaryReader.ReadChars(4).SequenceEqual("AFS2".ToCharArray())) + if (!binaryReader.ReadChars(4).SequenceEqual("AFS2")) throw new InvalidDataException("Incorrect magic."); binaryReader.BaseStream.Position += 0x1; offsetSize = binaryReader.ReadByte(); - binaryReader.BaseStream.Position += 0x2; + waveIdAlignment = binaryReader.ReadUInt16(); totalSubsongs = binaryReader.ReadInt32(); - alignment = binaryReader.ReadUInt16(); + offsetAlignment = binaryReader.ReadUInt16(); subkey = binaryReader.ReadUInt16(); waves = new List(totalSubsongs); for (int subsong = 1; subsong <= totalSubsongs; subsong++) { - long offset = 0x10; + long currentOffset = 0x10; - long waveIdOffset = offset + (subsong - 1) * 0x2; + long waveIdOffset = currentOffset + (subsong - 1) * waveIdAlignment; - binaryReader.BaseStream.Position = waveIdOffset; + binaryReader.BaseStream.Position = offset + waveIdOffset; int waveId = binaryReader.ReadUInt16(); - offset += totalSubsongs * 0x2; + currentOffset += totalSubsongs * waveIdAlignment; long subfileOffset = 0; long subfileNext = 0; long fileSize = binaryReader.BaseStream.Length; - offset += (subsong - 1) * offsetSize; + currentOffset += (subsong - 1) * offsetSize; - binaryReader.BaseStream.Position = offset; + binaryReader.BaseStream.Position = offset + currentOffset; switch (offsetSize) { @@ -93,10 +96,10 @@ namespace CriWareFormats break; } - subfileOffset += subfileOffset % alignment > 0 ? - alignment - subfileOffset % alignment : 0; - subfileNext += subfileNext % alignment > 0 && subfileNext < fileSize ? - alignment - subfileNext % alignment : 0; + subfileOffset += subfileOffset % offsetAlignment > 0 ? + offsetAlignment - subfileOffset % offsetAlignment : 0; + subfileNext += subfileNext % offsetAlignment > 0 && subfileNext < fileSize ? + offsetAlignment - subfileNext % offsetAlignment : 0; long subfileSize = subfileNext - subfileOffset; waves.Add(new Wave() @@ -123,7 +126,7 @@ namespace CriWareFormats public Stream GetWaveSubfileStream(Wave wave) { - return new SpliceStream(binaryReader.BaseStream, wave.Offset, wave.Length); + return new SpliceStream(binaryReader.BaseStream, offset + wave.Offset, wave.Length); } private static void Fail() diff --git a/Assets/Scripts/LiveToolBox/LiveViewerUI.cs b/Assets/Scripts/LiveToolBox/LiveViewerUI.cs index 938474e..1a61d77 100644 --- a/Assets/Scripts/LiveToolBox/LiveViewerUI.cs +++ b/Assets/Scripts/LiveToolBox/LiveViewerUI.cs @@ -15,6 +15,11 @@ public class LiveViewerUI : MonoBehaviour public Dropdown FrameRateDropDown; public GameObject RecordingUI; + + public Text LyricsText; + + public List CurrentLyrics = new List(); + float targetHeight = 0; float height; private void Awake() @@ -53,4 +58,10 @@ public class LiveViewerUI : MonoBehaviour { Application.targetFrameRate = int.Parse(FrameRateDropDown.options[fps].text); } + + public void UpdateLyrics(float time) + { + var text = UmaUtility.GetCurrentLyrics(time, CurrentLyrics); + LyricsText.text = text; + } } diff --git a/Assets/Scripts/UmaContainerCharacter.cs b/Assets/Scripts/UmaContainerCharacter.cs index a51c48c..1eec044 100644 --- a/Assets/Scripts/UmaContainerCharacter.cs +++ b/Assets/Scripts/UmaContainerCharacter.cs @@ -116,7 +116,7 @@ public class UmaContainerCharacter : UmaContainer //MergeHead if (Head) { - var headskins = Head.GetComponentsInChildren(); + var headskins = Head.GetComponentsInChildren(true); foreach (SkinnedMeshRenderer headskin in headskins) { MergeBone(headskin, bodyBones, ref emptyBones); @@ -231,28 +231,29 @@ public class UmaContainerCharacter : UmaContainer public void MergeBone(SkinnedMeshRenderer from, Dictionary targetBones, ref List emptyBones) { - var rootbone = targetBones[from.rootBone.name]; - if (rootbone) from.rootBone = rootbone; - - Transform[] tmpBone = new Transform[from.bones.Length]; - for (int i = 0; i < tmpBone.Length; i++) + if(targetBones.TryGetValue(from.rootBone.name, out Transform rootbone)) { - if (targetBones.TryGetValue(from.bones[i].name, out Transform targetbone)) + from.rootBone = rootbone; + Transform[] tmpBone = new Transform[from.bones.Length]; + for (int i = 0; i < tmpBone.Length; i++) { - tmpBone[i] = targetbone; - from.bones[i].position = targetbone.position; - while (from.bones[i].transform.childCount > 0) + if (targetBones.TryGetValue(from.bones[i].name, out Transform targetbone)) { - from.bones[i].transform.GetChild(0).SetParent(targetbone); + tmpBone[i] = targetbone; + from.bones[i].position = targetbone.position; + while (from.bones[i].transform.childCount > 0) + { + from.bones[i].transform.GetChild(0).SetParent(targetbone); + } + emptyBones.Add(from.bones[i]); + } + else + { + tmpBone[i] = from.bones[i]; } - emptyBones.Add(from.bones[i]); } - else - { - tmpBone[i] = from.bones[i]; - } - } - from.bones = tmpBone; + from.bones = tmpBone; + }; } public void LoadPhysics() diff --git a/Assets/Scripts/UmaDatabase/UmaDataTypes.cs b/Assets/Scripts/UmaDatabase/UmaDataTypes.cs index 64c245b..e1352a2 100644 --- a/Assets/Scripts/UmaDatabase/UmaDataTypes.cs +++ b/Assets/Scripts/UmaDatabase/UmaDataTypes.cs @@ -80,16 +80,21 @@ public class LiveEntry public class PartEntry { public Dictionary> PartSettings = new Dictionary>(); - + public int SingerCount = 0; public PartEntry(string data) { - string[] lines = data.Split("\n"[0]); + string[] lines = data.Split('\n'); string[] names = lines[0].Split(','); foreach (var name in names) { - PartSettings[name] = new List(); + var temp = name; + temp.Replace("lleft", "left2"); + temp.Replace("rright", "right2"); + temp.Replace("llleft", "left3"); + temp.Replace("rrright", "right3"); + PartSettings[temp] = new List(); } for (int i = 1; i < lines.Length - 1; i++) @@ -100,6 +105,17 @@ public class PartEntry PartSettings[names[j]].Add((float)Convert.ToDouble(values[j])); } } + + foreach(var part in PartSettings) + { + if (part.Key != "time" && !part.Key.Contains("_")) + { + if (part.Value.FindAll(v => v > 0).Count > 0) + { + SingerCount += 1; + } + } + } } } diff --git a/Assets/Scripts/UmaSceneController.cs b/Assets/Scripts/UmaSceneController.cs index be45d57..f91ee9a 100644 --- a/Assets/Scripts/UmaSceneController.cs +++ b/Assets/Scripts/UmaSceneController.cs @@ -1,6 +1,5 @@ using System; using System.Collections; -using System.Collections.Generic; using TMPro; using UnityEngine; using UnityEngine.SceneManagement; @@ -32,12 +31,12 @@ public class UmaSceneController:MonoBehaviour UmaAssetManager.OnLoadProgressChange += LoadingProgressChange; } - public static void LoadScene(string name, Action OnSceneloaded = null, Action OnLastSceneUnloaded = null) + public static void LoadScene(string name, Action OnSceneloaded = null, Action OnPrevSceneUnloaded = null) { - instance.StartCoroutine(instance.LoadLiveSceneAsync(name, OnSceneloaded, OnLastSceneUnloaded)); + instance.StartCoroutine(instance.LoadLiveSceneAsync(name, OnSceneloaded, OnPrevSceneUnloaded)); } - IEnumerator LoadLiveSceneAsync(string sceneName, Action OnSceneloaded, Action OnLastSceneUnloaded) + IEnumerator LoadLiveSceneAsync(string sceneName, Action OnSceneloaded, Action OnPrevSceneUnloaded) { if (CavansInstance) @@ -64,7 +63,7 @@ public class UmaSceneController:MonoBehaviour AsyncOperation asyncUnLoad = SceneManager.UnloadSceneAsync(currentScene); yield return new WaitUntil(() => asyncUnLoad.isDone); - OnLastSceneUnloaded?.Invoke(); + OnPrevSceneUnloaded?.Invoke(); animation.Play("SceneTransition_e"); yield return new WaitUntil(() => !animation.isPlaying); diff --git a/Assets/Scripts/UmaViewerAudio.cs b/Assets/Scripts/UmaViewerAudio.cs index a4f0bc8..08a9fba 100644 --- a/Assets/Scripts/UmaViewerAudio.cs +++ b/Assets/Scripts/UmaViewerAudio.cs @@ -16,7 +16,10 @@ public class UmaViewerAudio public class CuteAudioSource { + public string tag; + public bool enable; public float volume; + public float pan; public List sourceList; } @@ -27,7 +30,7 @@ public class UmaViewerAudio return info; } - static public CuteAudioSource ApplySound(string cueName) + static public CuteAudioSource ApplySound(string cueName, int part) { UmaSoundInfo soundInfo = getSoundPath(cueName); @@ -48,7 +51,10 @@ public class UmaViewerAudio CuteAudioSource cute = new CuteAudioSource { + tag = ((PartForm)part).ToString(), + enable = false, volume = 1, + pan = 0, sourceList = sourceList }; @@ -83,29 +89,19 @@ public class UmaViewerAudio { center = 0, left = 1, - right = 2 - } - - public static void SetSelectorLabel(CuteAudioSource sourceList, int index) - { - for(int i = 0; i < sourceList.sourceList.Count; i++) - { - if(i != index) - { - sourceList.sourceList[i].volume = 0; - } - else - { - sourceList.sourceList[i].volume = 1; - } - } + right = 2, + left2 = 3, + right2 = 4, + left3 = 5, + right3 = 6, } public static void ApplyMainVolume(CuteAudioSource sourceList) { foreach (var source in sourceList.sourceList) { - source.volume *= sourceList.volume; + source.volume = (sourceList.enable ? sourceList.volume : 0); + source.panStereo = sourceList.pan; } } @@ -125,98 +121,28 @@ public class UmaViewerAudio } } - var volumeMixer = 0; - var useMixer = false; - - float _999_count = 0; - bool _no999 = false; - for (int i = 0; i < liveVocal.Count; i++) { - string partName = ((PartForm)i).ToString(); + string partName = liveVocal[i].tag; if (partInfo.PartSettings.ContainsKey(partName)){ - var value = partInfo.PartSettings[partName][targetIndex]; - - if (value == 0) - { - liveVocal[i].volume = 0; - volumeMixer += 1; - } - else - { - liveVocal[i].volume = 1; - SetSelectorLabel(liveVocal[i], Convert.ToInt32(value - 1)); - } - + liveVocal[i].enable = partInfo.PartSettings[partName][targetIndex] > 0; - float volume; if (partInfo.PartSettings.ContainsKey(partName + "_vol")) { - volume = partInfo.PartSettings[partName + "_vol"][targetIndex]; - if(volume != 999) - { - liveVocal[i].volume *= volume; - } - else - { - _999_count += 1; - } + var volume = partInfo.PartSettings[partName + "_vol"][targetIndex]; + liveVocal[i].volume = (volume == 999 ? 1 : volume); } - else + + if (partInfo.PartSettings.ContainsKey(partName + "_pan")) { - _no999 = true; + var pan = partInfo.PartSettings[partName + "_pan"][targetIndex]; + liveVocal[i].pan = (pan == 999 ? 0 : pan); } + } } - if ((_999_count == liveVocal.Count && liveVocal.Count != 0) || _no999) - { - useMixer = true; - } - - if (useMixer) - { - switch (volumeMixer) - { - case 0: - liveVocal[0].volume = 0.7056f; - if(liveVocal.Count > 2) - { - liveVocal[2].volume = 0.56f; - } - if (liveVocal.Count > 1) - { - liveVocal[1].volume = 0.56f; - - } - break; - case 1: - for (int i = 0; i < liveVocal.Count; i++) - { - if (liveVocal[i].volume != 0) - { - liveVocal[i].volume = 0.7031f; - } - } - break; - case 2: - for (int i = 0; i < liveVocal.Count; i++) - { - if (liveVocal[i].volume != 0) - { - liveVocal[i].volume = 0.9954f; - } - } - break; - default: - for (int i = 0; i < liveVocal.Count; i++) - { - liveVocal[i].volume = 0; - } - break; - } - } foreach(var cute in liveVocal) { diff --git a/Assets/Scripts/UmaViewerBuilder.cs b/Assets/Scripts/UmaViewerBuilder.cs index fdd99f4..0283263 100644 --- a/Assets/Scripts/UmaViewerBuilder.cs +++ b/Assets/Scripts/UmaViewerBuilder.cs @@ -664,7 +664,6 @@ public class UmaViewerBuilder : MonoBehaviour mController.live = live; mController.IsRecordVMD = UI.isRecordVMD; - List transferObjs = new List() { MainLive, GameObject.Find("ViewerMain"), @@ -689,6 +688,11 @@ public class UmaViewerBuilder : MonoBehaviour LoadLiveUma(characters); + var Lyrics = LoadLiveLyrics(live.MusicId); + if (Lyrics != null) + { + LiveViewerUI.Instance.CurrentLyrics = Lyrics; + } }, delegate () { @@ -800,7 +804,7 @@ public class UmaViewerBuilder : MonoBehaviour return clips; } - public void LoadLiveLyrics(int songid) + public List LoadLiveLyrics(int songid) { if (CurrentLyrics.Count > 0) CurrentLyrics.Clear(); @@ -820,13 +824,14 @@ public class UmaViewerBuilder : MonoBehaviour UmaLyricsData lyricsData = new UmaLyricsData() { time = float.Parse(words[0]) / 1000, - text = (words.Length > 1) ? words[1].Replace("[COMMA]", ",") : "" + text = (words.Length > 1) ? words[1] : "" }; CurrentLyrics.Add(lyricsData); } catch { } } } + return CurrentLyrics; } public void LoadAssetPath(string path, Transform SetParent) diff --git a/Assets/Scripts/UmaViewerUI.cs b/Assets/Scripts/UmaViewerUI.cs index bd9f896..508b59e 100644 --- a/Assets/Scripts/UmaViewerUI.cs +++ b/Assets/Scripts/UmaViewerUI.cs @@ -169,7 +169,7 @@ public class UmaViewerUI : MonoBehaviour private void Update() { - if (Builder.CurrentAudioSources.Count > 0) + if (Builder.CurrentAudioSources.Count > 0 && Builder.CurrentAudioSources[0]) { AudioSource MianSource = Builder.CurrentAudioSources[0]; if (MianSource.clip) @@ -177,7 +177,8 @@ public class UmaViewerUI : MonoBehaviour 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); + LyricsText.text = UmaUtility.GetCurrentLyrics(MianSource.time, Builder.CurrentLyrics); + LyricsText.text = LyricsText.text; } } @@ -1216,18 +1217,6 @@ public class UmaViewerUI : MonoBehaviour return string.Format("{0:D2}m:{1:D2}s:{2:D2}f", minute, seconds, frames); } - public string GetCurrentLyrics(float time) - { - for (int i = Builder.CurrentLyrics.Count - 1; i >= 0; i--) - { - if (Builder.CurrentLyrics[i].time < time) - { - return Builder.CurrentLyrics[i].text; - } - } - return ""; - } - public void RecordVMD() { var container = Builder.CurrentUMAContainer; diff --git a/Assets/Scripts/Utility/UmaUtility.cs b/Assets/Scripts/Utility/UmaUtility.cs index 95bc8f2..57477cd 100644 --- a/Assets/Scripts/Utility/UmaUtility.cs +++ b/Assets/Scripts/Utility/UmaUtility.cs @@ -5,7 +5,7 @@ using System.Text; using System.Threading.Tasks; using UnityEngine; -public class UmaUtility +public static class UmaUtility { public static Dictionary ConvertListToDictionary(List transformList) { @@ -55,5 +55,19 @@ public class UmaUtility JsonUtility.FromJsonOverwrite(json, to); } + public static string GetCurrentLyrics(float time, List lyricsDatas) + { + for (int i = lyricsDatas.Count - 1; i >= 0; i--) + { + if (lyricsDatas[i].time < time) + { + var lyric = lyricsDatas[i].text; + lyric = lyric.Replace("[COMMA]", ","); + lyric = lyric.Replace("\\n", "\n"); + return lyric; + } + } + return ""; + } } diff --git a/Assets/Scripts/umamusume/Gallop/FaceDrivenKeyTarget.cs b/Assets/Scripts/umamusume/Gallop/FaceDrivenKeyTarget.cs index a9b38d8..cfa51fe 100644 --- a/Assets/Scripts/umamusume/Gallop/FaceDrivenKeyTarget.cs +++ b/Assets/Scripts/umamusume/Gallop/FaceDrivenKeyTarget.cs @@ -47,6 +47,12 @@ namespace Gallop List leftEarMorph = new List(); List rightEarMorph = new List(); + + FacialOtherMorph CheekMorph; + FacialOtherMorph ShadeMorph; + FacialOtherMorph MangaMorph; + List TearMorphs = new List(); + public void Initialize(Dictionary objs) { Objs = objs; @@ -247,6 +253,7 @@ namespace Gallop CheekMorph.BindProperties.Add(cheekProperty2); } OtherMorphs.Add(CheekMorph); + this.CheekMorph = CheekMorph; } Container.FaceMaterial = Container.Head.transform.Find("M_Face").GetComponent().material; @@ -266,6 +273,7 @@ namespace Gallop PropertyName = "_faceShadowAlpha" }); OtherMorphs.Add(FaceShadowMorph); + ShadeMorph = FaceShadowMorph; } FacialOtherMorph FaceMangaMorph = new FacialOtherMorph() @@ -290,6 +298,7 @@ namespace Gallop BindPrefab = mangaObjects }); OtherMorphs.Add(FaceMangaMorph); + MangaMorph = FaceMangaMorph; foreach (var tear in Container.TearControllers) { @@ -304,30 +313,35 @@ namespace Gallop Part = BindProperty.LocatorPart.ScaX, Type = BindProperty.BindType.TearWeight, BindTearController = tear, - Value = tear.Weight + Value = tear.Weight, + DefaultValue = tear.Weight }); FaceTearMorph.BindProperties.Add(new BindProperty() { Part = BindProperty.LocatorPart.PosY, Type = BindProperty.BindType.TearSide, BindTearController = tear, - Value = tear.CurrentDir + Value = tear.CurrentDir, + DefaultValue = tear.CurrentDir }); FaceTearMorph.BindProperties.Add(new BindProperty() { Part = BindProperty.LocatorPart.ScaY, Type = BindProperty.BindType.TearSelect, BindTearController = tear, - Value = tear.CurrenObject + Value = tear.CurrenObject, + DefaultValue = tear.CurrenObject }); FaceTearMorph.BindProperties.Add(new BindProperty() { Part = BindProperty.LocatorPart.ScaZ, Type = BindProperty.BindType.TearSpeed, BindTearController = tear, - Value = tear.Speed + Value = tear.Speed, + DefaultValue = tear.Speed }); OtherMorphs.Add(FaceTearMorph); + TearMorphs.Add(FaceTearMorph); } } @@ -415,6 +429,11 @@ namespace Gallop ApplyRotationEar(); } + public void ChangeMorphEffect() + { + OtherMorphs.ForEach(morph => ProcessExtraMorph(morph)); + } + public void ClearAllWeights() { EarMorphs.ForEach(morph => morph.weight = 0); @@ -426,7 +445,7 @@ namespace Gallop { morph.BindProperties.ForEach(property => { - property.Value = morph.GetLocatorValue(property.Part); + property.Value = property.DefaultValue; }); }); } @@ -467,11 +486,10 @@ namespace Gallop morph.BindGameObject.SetActive(true); property.BindMaterial.mainTexture = property.BindTexture; property.BindMaterial.SetFloat(property.PropertyName, property.Value); - return; } else { - if (morph.BindProperties.IndexOf(property) == morph.BindProperties.Count - 1) + if (morph.BindProperties.Find(p =>p.Value >0) == null) { morph.BindGameObject.SetActive(false); } @@ -546,6 +564,17 @@ namespace Gallop FacialReset(BaseREarMorph.trsArray); } + public void FacialResetEffect() + { + foreach(var morphs in OtherMorphs) + { + foreach(var property in morphs.BindProperties) + { + property.Value = property.DefaultValue; + } + } + } + public void FacialReset(List trsArrays) { foreach (TrsArray trs in trsArrays) @@ -655,16 +684,17 @@ namespace Gallop ChangeMorph(); } - public void ChangeMorphWeight(BindProperty property, float val, FacialMorph morph) + public void ChangeMorphWeight(BindProperty property, float val, FacialMorph morph, bool autoHideEye = true) { Container.isAnimatorControl = false; property.Value = val < 0 ? 0 : val; - ChangeMorph(); + ChangeMorphEffect(); - if (property.Type == BindProperty.BindType.Enable && morph.name.Contains("Manga")) + if (autoHideEye && property.Type == BindProperty.BindType.Enable && morph.name.Contains("Manga")) { - ChangeMorphWeight(EyeMorphs[42], val > 0 ? 1 : 0); - ChangeMorphWeight(EyeMorphs[43], val > 0 ? 1 : 0); + EyeMorphs[42].weight = (val > 0 ? 1 : 0); + EyeMorphs[43].weight = (val > 0 ? 1 : 0); + ChangeMorphEye(); } } @@ -888,6 +918,35 @@ namespace Gallop ChangeMorphMouth(); } + + var HasManga = false; + if (updateInfo_.effect != null) + { + var info = updateInfo_.effect; + var cheektype = info.cheekType; + for (int i = 0; i < CheekMorph.BindProperties.Count; i++) + { + CheekMorph.BindProperties[i].Value = (cheektype - 1 == i ? 1 : 0); + } + + var mangatype = info.mangameIndex; + if (mangatype == 0) + { + HasManga = false; + MangaMorph.BindProperties[1].Value = mangatype; + } + else + { + HasManga = true; + MangaMorph.BindProperties[0].Value = mangatype - 1; + MangaMorph.BindProperties[1].Value = 1; + } + + //TODO Support Tear effect + + ChangeMorphEffect(); + } + if (updateInfo_.eyeCur != null) { @@ -936,8 +995,9 @@ namespace Gallop rightEyeMorph[part.FacialPartsId - 1].weight += ((float)part.WeightPer / 100 * weightRatio) * ((float)updateInfo_.eyeCur.weight / 100); } + EyeMorphs[42].weight = (HasManga ? 1 : 0); //Hide eye when has Manga eye + EyeMorphs[43].weight = (HasManga ? 1 : 0); ChangeMorphEye(); - } if (updateInfo_.eyebrowCur != null) @@ -1070,8 +1130,6 @@ namespace Gallop SetEyeTrack(finalRotation); } - - } public Vector2 GetTimelineEyeTrackRotation(LiveTimelineKeyFacialEyeTrackData key) diff --git a/Assets/Scripts/umamusume/Gallop/FacialMorph.cs b/Assets/Scripts/umamusume/Gallop/FacialMorph.cs index 34285c6..307703f 100644 --- a/Assets/Scripts/umamusume/Gallop/FacialMorph.cs +++ b/Assets/Scripts/umamusume/Gallop/FacialMorph.cs @@ -81,5 +81,6 @@ namespace Gallop public LocatorPart Part; public BindType Type; public float Value; + public float DefaultValue; } } diff --git a/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimelineControl.cs b/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimelineControl.cs index 40a8031..af14c33 100644 --- a/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimelineControl.cs +++ b/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimelineControl.cs @@ -380,6 +380,7 @@ namespace Gallop.Live.Cutt SetupFacialUpdateInfo_Eyebrow(ref updateInfo, facialDataList.eyebrowKeys, liveTime); SetupFacialUpdateInfo_Ear(ref updateInfo, facialDataList.earKeys, liveTime); SetupFacialUpdateInfo_EyeTrack(ref updateInfo, facialDataList.eyeTrackKeys, liveTime); + SetupFacialUpdateInfo_Effect(ref updateInfo, facialDataList.effectKeys, liveTime); this.OnUpdateFacial(updateInfo, liveTime, 0); } @@ -391,6 +392,7 @@ namespace Gallop.Live.Cutt SetupFacialUpdateInfo_Eyebrow(ref updateInfo, otherFacialDataList[i].eyebrowKeys, liveTime); SetupFacialUpdateInfo_Ear(ref updateInfo, otherFacialDataList[i].earKeys, liveTime); SetupFacialUpdateInfo_EyeTrack(ref updateInfo, otherFacialDataList[i].eyeTrackKeys, liveTime); + SetupFacialUpdateInfo_Effect(ref updateInfo, otherFacialDataList[i].effectKeys, liveTime); this.OnUpdateFacial(updateInfo, liveTime, i+1); } } @@ -435,6 +437,20 @@ namespace Gallop.Live.Cutt } } + private void SetupFacialUpdateInfo_Effect(ref FacialDataUpdateInfo updateInfo, LiveTimelineKeyFacialEffectDataList keys, float time) + { + LiveTimelineKey liveTimelineKey = null; + + LiveTimelineKeyIndex curKey = AlterUpdate_Key(keys, time); + if (curKey != null) + { + liveTimelineKey = curKey.key; + + updateInfo.effect = liveTimelineKey as LiveTimelineKeyFacialEffectData; + updateInfo.effectKeyIndex = curKey.index; + } + } + private void SetupFacialUpdateInfo_Eyebrow(ref FacialDataUpdateInfo updateInfo, LiveTimelineKeyFacialEyebrowDataList keys, float time) { LiveTimelineKey liveTimelineKey = null; diff --git a/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimelineDataList/LiveTimelineFacialData.cs b/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimelineDataList/LiveTimelineFacialData.cs index fcd19b7..a5b5ea7 100644 --- a/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimelineDataList/LiveTimelineFacialData.cs +++ b/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimelineDataList/LiveTimelineFacialData.cs @@ -129,7 +129,7 @@ namespace Gallop.Live.Cutt public int cheekType; public int tearyType; public int tearfulType; - public LiveTimelineKeyFacialEffectData.TeardropConfig[] teardropConfigs; + public TeardropConfig[] teardropConfigs; public int mangameIndex; } diff --git a/Assets/Scripts/umamusume/Gallop/Live/Director.cs b/Assets/Scripts/umamusume/Gallop/Live/Director.cs index 7e5e490..4fd5ae0 100644 --- a/Assets/Scripts/umamusume/Gallop/Live/Director.cs +++ b/Assets/Scripts/umamusume/Gallop/Live/Director.cs @@ -559,18 +559,10 @@ namespace Gallop.Live public void InitializeMusic(int songid, List characters) { - Debug.Log(songid); - - int singer = 3; - - if (_soloMode) - { - singer = 1; - } for (int i = 0; i < characters.Count; i++) { - if (characters[i].CharaEntry.Name != "" && i < 3) + if (characters[i].CharaEntry.Name != "" && i < partInfo.SingerCount) { var charaid = characters[i].CharaEntry.Id; @@ -591,13 +583,13 @@ namespace Gallop.Live if (entry != null) { Debug.Log(entry.Name); - liveVocal.Add(UmaViewerAudio.ApplySound(entry.Name.Split('.')[0])); + liveVocal.Add(UmaViewerAudio.ApplySound(entry.Name.Split('.')[0], i)); } } } - liveMusic = UmaViewerAudio.ApplySound(string.Format(SONG_PATH, songid)); + liveMusic = UmaViewerAudio.ApplySound(string.Format(SONG_PATH, songid), -1); } public void Play() @@ -725,6 +717,7 @@ namespace Gallop.Live OnTimelineUpdate(_liveCurrentTime); } } + UpdateMainCamera(); } } @@ -737,6 +730,11 @@ namespace Gallop.Live } } + private void FixedUpdate() + { + LiveViewerUI.Instance.UpdateLyrics(_liveCurrentTime); + } + DateTime ExitTime; private void ExitLive() {