diff --git a/.idea/.idea.zhanglijun/.idea/vcs.xml b/.idea/.idea.zhanglijun/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/.idea.zhanglijun/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Assets/Artworks/MeiGongZiYuan/Animations/ShiYanShi2-DH/2~2_tongxueA.controller b/Assets/Artworks/MeiGongZiYuan/Animations/ShiYanShi2-DH/2~2_tongxueA.controller index 61eae79..cf449e1 100644 --- a/Assets/Artworks/MeiGongZiYuan/Animations/ShiYanShi2-DH/2~2_tongxueA.controller +++ b/Assets/Artworks/MeiGongZiYuan/Animations/ShiYanShi2-DH/2~2_tongxueA.controller @@ -33,7 +33,7 @@ AnimatorStateMachine: m_ChildStates: - serializedVersion: 1 m_State: {fileID: 5293858650183072699} - m_Position: {x: 200, y: 0, z: 0} + m_Position: {x: 270, y: 170, z: 0} m_ChildStateMachines: [] m_AnyStateTransitions: [] m_EntryTransitions: [] @@ -64,7 +64,8 @@ AnimatorState: m_MirrorParameterActive: 0 m_CycleOffsetParameterActive: 0 m_TimeParameterActive: 0 - m_Motion: {fileID: 1827226128182048838, guid: b0165af1b62f4df4c9b04d59700c300f, type: 3} + m_Motion: {fileID: 1827226128182048838, guid: b0165af1b62f4df4c9b04d59700c300f, + type: 3} m_Tag: m_SpeedParameter: m_MirrorParameter: diff --git a/Assets/Artworks/MeiGongZiYuan/Animations/ShiYanShi2-DH/2~2_tongxueC.FBX.meta b/Assets/Artworks/MeiGongZiYuan/Animations/ShiYanShi2-DH/2~2_tongxueC.FBX.meta index 9643bc0..7d74c88 100644 --- a/Assets/Artworks/MeiGongZiYuan/Animations/ShiYanShi2-DH/2~2_tongxueC.FBX.meta +++ b/Assets/Artworks/MeiGongZiYuan/Animations/ShiYanShi2-DH/2~2_tongxueC.FBX.meta @@ -102,7 +102,7 @@ ModelImporter: cycleOffset: 0 loop: 0 hasAdditiveReferencePose: 0 - loopTime: 1 + loopTime: 0 loopBlend: 0 loopBlendOrientation: 0 loopBlendPositionY: 0 diff --git a/Assets/Artworks/MeiGongZiYuan/Animations/ShiYanShi2-DH/2~3_tongxueE.FBX.meta b/Assets/Artworks/MeiGongZiYuan/Animations/ShiYanShi2-DH/2~3_tongxueE.FBX.meta index f31fc86..1613b32 100644 --- a/Assets/Artworks/MeiGongZiYuan/Animations/ShiYanShi2-DH/2~3_tongxueE.FBX.meta +++ b/Assets/Artworks/MeiGongZiYuan/Animations/ShiYanShi2-DH/2~3_tongxueE.FBX.meta @@ -44,7 +44,7 @@ ModelImporter: cycleOffset: 0 loop: 0 hasAdditiveReferencePose: 0 - loopTime: 1 + loopTime: 0 loopBlend: 0 loopBlendOrientation: 0 loopBlendPositionY: 0 @@ -73,7 +73,7 @@ ModelImporter: cycleOffset: 0 loop: 0 hasAdditiveReferencePose: 0 - loopTime: 1 + loopTime: 0 loopBlend: 0 loopBlendOrientation: 0 loopBlendPositionY: 0 diff --git a/Assets/Artworks/MeiGongZiYuan/Animations/ShiYanShi2-DH/2~3_tongxueE.controller b/Assets/Artworks/MeiGongZiYuan/Animations/ShiYanShi2-DH/2~3_tongxueE.controller index 228254e..e922271 100644 --- a/Assets/Artworks/MeiGongZiYuan/Animations/ShiYanShi2-DH/2~3_tongxueE.controller +++ b/Assets/Artworks/MeiGongZiYuan/Animations/ShiYanShi2-DH/2~3_tongxueE.controller @@ -11,7 +11,7 @@ AnimatorStateMachine: m_ChildStates: - serializedVersion: 1 m_State: {fileID: 3987000052103911472} - m_Position: {x: 200, y: 0, z: 0} + m_Position: {x: 280, y: 100, z: 0} m_ChildStateMachines: [] m_AnyStateTransitions: [] m_EntryTransitions: [] @@ -64,7 +64,8 @@ AnimatorState: m_MirrorParameterActive: 0 m_CycleOffsetParameterActive: 0 m_TimeParameterActive: 0 - m_Motion: {fileID: 1827226128182048838, guid: a61570d86a77b4e41b444c980929738d, type: 3} + m_Motion: {fileID: 1827226128182048838, guid: a61570d86a77b4e41b444c980929738d, + type: 3} m_Tag: m_SpeedParameter: m_MirrorParameter: diff --git a/Assets/UnityTest/ZXL/Assets.meta b/Assets/UnityTest/ZXL/Assets.meta new file mode 100644 index 0000000..ce0253c --- /dev/null +++ b/Assets/UnityTest/ZXL/Assets.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 04bf0b3bc2664c5495c6dade6de3fcfb +timeCreated: 1694531489 \ No newline at end of file diff --git a/Assets/UnityTest/ZXL/Scene/Main.unity b/Assets/UnityTest/ZXL/Scene/Main.unity index 499630e..b1d062a 100644 --- a/Assets/UnityTest/ZXL/Scene/Main.unity +++ b/Assets/UnityTest/ZXL/Scene/Main.unity @@ -11531,6 +11531,108 @@ PrefabInstance: objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 12ff962fdd1e1e94b9b1e98f083c46a8, type: 3} +--- !u!1001 &461131878 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 733604854} + m_Modifications: + - target: {fileID: -8679921383154817045, guid: a61570d86a77b4e41b444c980929738d, + type: 3} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: a61570d86a77b4e41b444c980929738d, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: a61570d86a77b4e41b444c980929738d, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: a61570d86a77b4e41b444c980929738d, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: a61570d86a77b4e41b444c980929738d, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: a61570d86a77b4e41b444c980929738d, + type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: a61570d86a77b4e41b444c980929738d, + type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: a61570d86a77b4e41b444c980929738d, + type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: a61570d86a77b4e41b444c980929738d, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: a61570d86a77b4e41b444c980929738d, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: a61570d86a77b4e41b444c980929738d, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 919132149155446097, guid: a61570d86a77b4e41b444c980929738d, + type: 3} + propertyPath: m_Name + value: 2~3_tongxueE (1) + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: a61570d86a77b4e41b444c980929738d, type: 3} +--- !u!1 &461131879 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: a61570d86a77b4e41b444c980929738d, + type: 3} + m_PrefabInstance: {fileID: 461131878} + m_PrefabAsset: {fileID: 0} +--- !u!4 &461131880 stripped +Transform: + m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: a61570d86a77b4e41b444c980929738d, + type: 3} + m_PrefabInstance: {fileID: 461131878} + m_PrefabAsset: {fileID: 0} +--- !u!95 &461131881 +Animator: + serializedVersion: 5 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 461131879} + m_Enabled: 1 + m_Avatar: {fileID: 0} + m_Controller: {fileID: 9100000, guid: 36649e8c3bb37384ab35e6f2b07d3a30, type: 2} + m_CullingMode: 0 + m_UpdateMode: 0 + m_ApplyRootMotion: 0 + m_LinearVelocityBlending: 0 + m_StabilizeFeet: 0 + m_WarningMessage: + m_HasTransformHierarchy: 1 + m_AllowConstantClipSamplingOptimization: 1 + m_KeepAnimatorStateOnDisable: 0 + m_WriteDefaultValuesOnDisable: 0 --- !u!1 &471078484 GameObject: m_ObjectHideFlags: 0 @@ -17744,6 +17846,38 @@ Transform: m_Father: {fileID: 1593517584} m_RootOrder: 12 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &733604852 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 733604854} + m_Layer: 0 + m_Name: Test + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &733604854 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 733604852} + 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_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 461131880} + m_Father: {fileID: 0} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &733957527 GameObject: m_ObjectHideFlags: 0 @@ -32936,6 +33070,7 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 1593517584} + - component: {fileID: 1593517585} m_Layer: 0 m_Name: Animations m_TagString: Untagged @@ -32975,6 +33110,509 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1593517585 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1593517583} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 36cbc24cd0514980a4fabdee498a6bfb, type: 3} + m_Name: + m_EditorClassIdentifier: + serializationData: + SerializedFormat: 2 + SerializedBytes: + ReferencedUnityObjects: + - {fileID: 2008245095} + - {fileID: 980783916} + - {fileID: 425978245} + - {fileID: 675264984} + - {fileID: 755497426} + - {fileID: 832800403} + - {fileID: 1872876346} + - {fileID: 34233047} + - {fileID: 25939700} + - {fileID: 1445323537} + - {fileID: 58637062} + - {fileID: 573095942} + - {fileID: 2076571750} + - {fileID: 147383034} + - {fileID: 424166791} + - {fileID: 1739439510} + - {fileID: 324589694} + - {fileID: 128226126} + - {fileID: 1600003584} + - {fileID: 612757364} + - {fileID: 616033231} + - {fileID: 1215774805} + - {fileID: 2102446151} + - {fileID: 410887829} + - {fileID: 179901709} + - {fileID: 61712748} + - {fileID: 595983227} + - {fileID: 800570413} + - {fileID: 693377319} + - {fileID: 1955482979} + - {fileID: 486137304} + - {fileID: 1613137119} + - {fileID: 487012804} + SerializedBytesString: + Prefab: {fileID: 0} + PrefabModificationsReferencedUnityObjects: [] + PrefabModifications: [] + SerializationNodes: + - Name: dictionary + Entry: 7 + Data: 0|System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[System.Collections.Generic.List`1[[UnityEngine.Animator, + UnityEngine.AnimationModule]], mscorlib]], mscorlib + - Name: comparer + Entry: 7 + Data: 1|System.Collections.Generic.GenericEqualityComparer`1[[System.String, + mscorlib]], mscorlib + - Name: + Entry: 8 + Data: + - Name: + Entry: 12 + Data: 15 + - Name: + Entry: 7 + Data: + - Name: $k + Entry: 1 + Data: 2-2 + - Name: $v + Entry: 7 + Data: 2|System.Collections.Generic.List`1[[UnityEngine.Animator, UnityEngine.AnimationModule]], + mscorlib + - Name: + Entry: 12 + Data: 3 + - Name: + Entry: 10 + Data: 0 + - Name: + Entry: 10 + Data: 1 + - Name: + Entry: 10 + Data: 2 + - Name: + Entry: 13 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 7 + Data: + - Name: $k + Entry: 1 + Data: 2-3 + - Name: $v + Entry: 7 + Data: 3|System.Collections.Generic.List`1[[UnityEngine.Animator, UnityEngine.AnimationModule]], + mscorlib + - Name: + Entry: 12 + Data: 4 + - Name: + Entry: 10 + Data: 3 + - Name: + Entry: 10 + Data: 4 + - Name: + Entry: 10 + Data: 5 + - Name: + Entry: 10 + Data: 6 + - Name: + Entry: 13 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 7 + Data: + - Name: $k + Entry: 1 + Data: 2-4 + - Name: $v + Entry: 7 + Data: 4|System.Collections.Generic.List`1[[UnityEngine.Animator, UnityEngine.AnimationModule]], + mscorlib + - Name: + Entry: 12 + Data: 7 + - Name: + Entry: 10 + Data: 7 + - Name: + Entry: 10 + Data: 8 + - Name: + Entry: 10 + Data: 9 + - Name: + Entry: 10 + Data: 10 + - Name: + Entry: 10 + Data: 11 + - Name: + Entry: 10 + Data: 12 + - Name: + Entry: 10 + Data: 13 + - Name: + Entry: 13 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 7 + Data: + - Name: $k + Entry: 1 + Data: 2-5 + - Name: $v + Entry: 7 + Data: 5|System.Collections.Generic.List`1[[UnityEngine.Animator, UnityEngine.AnimationModule]], + mscorlib + - Name: + Entry: 12 + Data: 1 + - Name: + Entry: 10 + Data: 14 + - Name: + Entry: 13 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 7 + Data: + - Name: $k + Entry: 1 + Data: 2-6 + - Name: $v + Entry: 7 + Data: 6|System.Collections.Generic.List`1[[UnityEngine.Animator, UnityEngine.AnimationModule]], + mscorlib + - Name: + Entry: 12 + Data: 1 + - Name: + Entry: 10 + Data: 15 + - Name: + Entry: 13 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 7 + Data: + - Name: $k + Entry: 1 + Data: 2-7 + - Name: $v + Entry: 7 + Data: 7|System.Collections.Generic.List`1[[UnityEngine.Animator, UnityEngine.AnimationModule]], + mscorlib + - Name: + Entry: 12 + Data: 2 + - Name: + Entry: 10 + Data: 16 + - Name: + Entry: 10 + Data: 17 + - Name: + Entry: 13 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 7 + Data: + - Name: $k + Entry: 1 + Data: 2-8 + - Name: $v + Entry: 7 + Data: 8|System.Collections.Generic.List`1[[UnityEngine.Animator, UnityEngine.AnimationModule]], + mscorlib + - Name: + Entry: 12 + Data: 2 + - Name: + Entry: 10 + Data: 18 + - Name: + Entry: 10 + Data: 19 + - Name: + Entry: 13 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 7 + Data: + - Name: $k + Entry: 1 + Data: 2-9 + - Name: $v + Entry: 7 + Data: 9|System.Collections.Generic.List`1[[UnityEngine.Animator, UnityEngine.AnimationModule]], + mscorlib + - Name: + Entry: 12 + Data: 2 + - Name: + Entry: 10 + Data: 20 + - Name: + Entry: 10 + Data: 21 + - Name: + Entry: 13 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 7 + Data: + - Name: $k + Entry: 1 + Data: 2-10 + - Name: $v + Entry: 7 + Data: 10|System.Collections.Generic.List`1[[UnityEngine.Animator, UnityEngine.AnimationModule]], + mscorlib + - Name: + Entry: 12 + Data: 2 + - Name: + Entry: 10 + Data: 22 + - Name: + Entry: 10 + Data: 23 + - Name: + Entry: 13 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 7 + Data: + - Name: $k + Entry: 1 + Data: 2-11 + - Name: $v + Entry: 7 + Data: 11|System.Collections.Generic.List`1[[UnityEngine.Animator, UnityEngine.AnimationModule]], + mscorlib + - Name: + Entry: 12 + Data: 2 + - Name: + Entry: 10 + Data: 24 + - Name: + Entry: 10 + Data: 25 + - Name: + Entry: 13 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 7 + Data: + - Name: $k + Entry: 1 + Data: 2-12 + - Name: $v + Entry: 7 + Data: 12|System.Collections.Generic.List`1[[UnityEngine.Animator, UnityEngine.AnimationModule]], + mscorlib + - Name: + Entry: 12 + Data: 1 + - Name: + Entry: 10 + Data: 26 + - Name: + Entry: 13 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 7 + Data: + - Name: $k + Entry: 1 + Data: 2-13 + - Name: $v + Entry: 7 + Data: 13|System.Collections.Generic.List`1[[UnityEngine.Animator, UnityEngine.AnimationModule]], + mscorlib + - Name: + Entry: 12 + Data: 2 + - Name: + Entry: 10 + Data: 27 + - Name: + Entry: 10 + Data: 28 + - Name: + Entry: 13 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 7 + Data: + - Name: $k + Entry: 1 + Data: 2-14 + - Name: $v + Entry: 7 + Data: 14|System.Collections.Generic.List`1[[UnityEngine.Animator, UnityEngine.AnimationModule]], + mscorlib + - Name: + Entry: 12 + Data: 2 + - Name: + Entry: 10 + Data: 29 + - Name: + Entry: 10 + Data: 30 + - Name: + Entry: 13 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 7 + Data: + - Name: $k + Entry: 1 + Data: 2-15 + - Name: $v + Entry: 7 + Data: 15|System.Collections.Generic.List`1[[UnityEngine.Animator, UnityEngine.AnimationModule]], + mscorlib + - Name: + Entry: 12 + Data: 1 + - Name: + Entry: 10 + Data: 31 + - Name: + Entry: 13 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 7 + Data: + - Name: $k + Entry: 1 + Data: HuanZuang + - Name: $v + Entry: 7 + Data: 16|System.Collections.Generic.List`1[[UnityEngine.Animator, UnityEngine.AnimationModule]], + mscorlib + - Name: + Entry: 12 + Data: 1 + - Name: + Entry: 10 + Data: 32 + - Name: + Entry: 13 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 13 + Data: + - Name: + Entry: 8 + Data: --- !u!1001 &1600003582 PrefabInstance: m_ObjectHideFlags: 0 @@ -40348,7 +40986,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!224 &1916875338 RectTransform: m_ObjectHideFlags: 0 diff --git a/Assets/UnityTest/ZXL/Scripts.meta b/Assets/UnityTest/ZXL/Scripts.meta new file mode 100644 index 0000000..be55c75 --- /dev/null +++ b/Assets/UnityTest/ZXL/Scripts.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1fa73cfe0f0b2f94fa142458ec1d7c04 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityTest/ZXL/Scripts/AnimatorManager.cs b/Assets/UnityTest/ZXL/Scripts/AnimatorManager.cs new file mode 100644 index 0000000..bf6b8ee --- /dev/null +++ b/Assets/UnityTest/ZXL/Scripts/AnimatorManager.cs @@ -0,0 +1,32 @@ +using System.Collections.Generic; +using Sirenix.OdinInspector; +using UnityEditor; +using UnityEngine; + +namespace UnityTest.ZXL +{ + public class AnimatorManager : SerializedMonoBehaviour + { + public Dictionary> dictionary = new Dictionary>(); + + [Button("Add")] + void AutoAdd() + { + var activeObject = Selection.activeObject as GameObject; + var animators = activeObject.GetComponentAllChild(); + foreach (var animator in animators) + { + var animatorName = animator.name; + if (animator.transform.parent != null) + { + animatorName = animator.transform.parent.name; + } + + if (dictionary.ContainsKey(animatorName)) + dictionary[animatorName].Add(animator); + else + dictionary.Add(animatorName, new List() { animator }); + } + } + } +} \ No newline at end of file diff --git a/Assets/UnityTest/ZXL/Scripts/AnimatorManager.cs.meta b/Assets/UnityTest/ZXL/Scripts/AnimatorManager.cs.meta new file mode 100644 index 0000000..4dffc73 --- /dev/null +++ b/Assets/UnityTest/ZXL/Scripts/AnimatorManager.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 36cbc24cd0514980a4fabdee498a6bfb +timeCreated: 1694529226 \ No newline at end of file diff --git a/Assets/UnityTest/ZXL/Scripts/CameraManager.cs b/Assets/UnityTest/ZXL/Scripts/CameraManager.cs new file mode 100644 index 0000000..d7740c0 --- /dev/null +++ b/Assets/UnityTest/ZXL/Scripts/CameraManager.cs @@ -0,0 +1,8 @@ +using Sirenix.OdinInspector; + +namespace UnityTest.ZXL +{ + public class CameraManager : SerializedMonoBehaviour + { + } +} \ No newline at end of file diff --git a/Assets/UnityTest/ZXL/Scripts/CameraManager.cs.meta b/Assets/UnityTest/ZXL/Scripts/CameraManager.cs.meta new file mode 100644 index 0000000..f5e0121 --- /dev/null +++ b/Assets/UnityTest/ZXL/Scripts/CameraManager.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: e7603f3bcb2041c68d258e475b0c7b6a +timeCreated: 1694529177 \ No newline at end of file diff --git a/Assets/UnityTest/ZXL/Scripts/CommonHelper.cs b/Assets/UnityTest/ZXL/Scripts/CommonHelper.cs new file mode 100644 index 0000000..a9c053c --- /dev/null +++ b/Assets/UnityTest/ZXL/Scripts/CommonHelper.cs @@ -0,0 +1,92 @@ +using System; +using System.Collections.Generic; +using HighlightPlus; +using UnityEngine; +using UnityEngine.UI.Extensions; +using Object = UnityEngine.Object; + +namespace UnityTest.ZXL +{ + public static class CommonHelper + { + /// + /// 获取子物体所有具有某个组件的物体 + /// + /// + /// + /// + public static List GetComponentAllChild(this GameObject self) where T : Object + { + List list = new List(); + + Get(self, ref list); + + return list; + } + + private static void Get(GameObject go, ref List list) where T : Object + { + if (go.TryGetComponent(out T t)) + { + list.Add(t); + } + + var goTransform = go.transform; + for (var i = 0; i < goTransform.childCount; i++) + { + Get(goTransform.GetChild(i).gameObject, ref list); + } + } + + /// + /// 高亮开启 + /// + /// + public static void HighlightOpen(this GameObject self) + { + var highlightEffect = self.GetOrAddComponent(); + highlightEffect.highlighted = true; + } + + /// + /// 高亮关闭 + /// + /// + public static void HighlightOff(this GameObject self) + { + if (!self.TryGetComponent(out HighlightEffect highlightEffect)) + Debug.LogError($"{self.name} dont have HighlightEffect Component !!!!"); + + highlightEffect.highlighted = false; + } + + /// + /// 等待动画播放结束后执行回调方法 + /// + /// + /// + /// + /// + public static System.Collections.IEnumerator WaitAnimatorPlayOver(this Animator animator, string clipName, Action action) + { + bool isOver = false; + AnimatorStateInfo animatorInfo; + + animator.Play(clipName); + Debug.Log($"Start Play {clipName} Clip"); + + while (!isOver) + { + yield return null; + animatorInfo = animator.GetCurrentAnimatorStateInfo(0); //必须放在update里 + if ((animatorInfo.normalizedTime > 1.0f) && (animatorInfo.IsName(clipName))) //normalizedTime: 范围0 -- 1, 0是动作开始,1是动作结束 + { + animator.SetInteger(clipName, 0); //播放完成后回到待机动画 + isOver = true; + } + } + + Debug.Log($"End Play {clipName} Clip"); + } + } +} \ No newline at end of file diff --git a/Assets/UnityTest/ZXL/Scripts/CommonHelper.cs.meta b/Assets/UnityTest/ZXL/Scripts/CommonHelper.cs.meta new file mode 100644 index 0000000..6349c90 --- /dev/null +++ b/Assets/UnityTest/ZXL/Scripts/CommonHelper.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 80132bbc4b4144869c97bd3fbde4f8c3 +timeCreated: 1694529195 \ No newline at end of file diff --git a/Assets/UnityTest/ZXL/Scripts/DialogueAsset.cs b/Assets/UnityTest/ZXL/Scripts/DialogueAsset.cs new file mode 100644 index 0000000..e5b1f27 --- /dev/null +++ b/Assets/UnityTest/ZXL/Scripts/DialogueAsset.cs @@ -0,0 +1,10 @@ +using System.Collections.Generic; +using UnityEngine; + +namespace UnityTest.ZXL +{ + public class DialogueAsset : ScriptableObject + { + public List datas; + } +} \ No newline at end of file diff --git a/Assets/UnityTest/ZXL/Scripts/DialogueAsset.cs.meta b/Assets/UnityTest/ZXL/Scripts/DialogueAsset.cs.meta new file mode 100644 index 0000000..839b880 --- /dev/null +++ b/Assets/UnityTest/ZXL/Scripts/DialogueAsset.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 08508fc4ecdb4237ab71fcfd556138fb +timeCreated: 1694531514 \ No newline at end of file diff --git a/Assets/UnityTest/ZXL/Scripts/DialogueData.cs b/Assets/UnityTest/ZXL/Scripts/DialogueData.cs new file mode 100644 index 0000000..2b9f476 --- /dev/null +++ b/Assets/UnityTest/ZXL/Scripts/DialogueData.cs @@ -0,0 +1,22 @@ +using Sirenix.OdinInspector; + +namespace UnityTest.ZXL +{ + [System.Serializable] + public struct DialogueData + { + [ShowInInspector] [ReadOnly] private int index; + public DialogueType dialogueType; + public string content; + } + + public enum DialogueType + { + 学校实验室管理处负责老师K, + 学院安全总负责人H, + 学院应急处置小组负责人J, + 火警119, + 实验负责老师F, + 实验组安全负责人同学G, + } +} \ No newline at end of file diff --git a/Assets/UnityTest/ZXL/Scripts/DialogueData.cs.meta b/Assets/UnityTest/ZXL/Scripts/DialogueData.cs.meta new file mode 100644 index 0000000..a416de6 --- /dev/null +++ b/Assets/UnityTest/ZXL/Scripts/DialogueData.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 3637711671e14da7a94c7d2a75f66d3a +timeCreated: 1694529366 \ No newline at end of file diff --git a/Assets/UnityTest/ZXL/Scripts/EditorHelper.cs b/Assets/UnityTest/ZXL/Scripts/EditorHelper.cs new file mode 100644 index 0000000..3305943 --- /dev/null +++ b/Assets/UnityTest/ZXL/Scripts/EditorHelper.cs @@ -0,0 +1,7 @@ +namespace UnityTest.ZXL +{ + public static class EditorHelper + { + + } +} \ No newline at end of file diff --git a/Assets/UnityTest/ZXL/Scripts/EditorHelper.cs.meta b/Assets/UnityTest/ZXL/Scripts/EditorHelper.cs.meta new file mode 100644 index 0000000..13cd391 --- /dev/null +++ b/Assets/UnityTest/ZXL/Scripts/EditorHelper.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: c0e6566bf1c7451a9e8b1502699e2175 +timeCreated: 1694529212 \ No newline at end of file diff --git a/Assets/UnityTest/ZXL/Scripts/Test.cs b/Assets/UnityTest/ZXL/Scripts/Test.cs new file mode 100644 index 0000000..9d07a62 --- /dev/null +++ b/Assets/UnityTest/ZXL/Scripts/Test.cs @@ -0,0 +1,24 @@ +using System.Collections.Generic; +using Sirenix.OdinInspector; +using UnityEditor; +using UnityEngine; + +namespace UnityTest.ZXL +{ + public class Test : SerializedMonoBehaviour + { + [FolderPath] public string folderPath; + public string assetName; + + [Button] + void AA() + { + string path = $"{folderPath}/{assetName}.asset"; + + DialogueAsset dialogueAsset = ScriptableObject.CreateInstance(); + dialogueAsset.datas = new List(); + + AssetDatabase.CreateAsset(dialogueAsset, path); + } + } +} \ No newline at end of file diff --git a/Assets/UnityTest/ZXL/Scripts/Test.cs.meta b/Assets/UnityTest/ZXL/Scripts/Test.cs.meta new file mode 100644 index 0000000..7ef38a4 --- /dev/null +++ b/Assets/UnityTest/ZXL/Scripts/Test.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 14ba04d6aa1740c49f37acc87e4c1c9e +timeCreated: 1694529316 \ No newline at end of file diff --git a/ProjectSettings/QualitySettings.asset b/ProjectSettings/QualitySettings.asset index 6eb2ea8..1113ad8 100644 --- a/ProjectSettings/QualitySettings.asset +++ b/ProjectSettings/QualitySettings.asset @@ -188,7 +188,7 @@ QualitySettings: excludedTargetPlatforms: [] - serializedVersion: 2 name: Ultra - pixelLightCount: 4 + pixelLightCount: 0 shadows: 2 shadowResolution: 2 shadowProjection: 1