diff --git a/Assets/AddressableAssetsData/AssetGroups/Actor Resources.asset b/Assets/AddressableAssetsData/AssetGroups/Actor Resources.asset index 38a9a54a0..507ab539a 100644 --- a/Assets/AddressableAssetsData/AssetGroups/Actor Resources.asset +++ b/Assets/AddressableAssetsData/AssetGroups/Actor Resources.asset @@ -102,6 +102,16 @@ MonoBehaviour: m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 + - m_GUID: 5f26e5dcbc809104f92f908082de97d5 + m_Address: "Animation/\u8C03\u9152\u59B9\u6D4B\u8BD5" + m_ReadOnly: 0 + m_SerializedLabels: [] + FlaggedDuringContentUpdateRestriction: 0 + - m_GUID: 7985fcc6bb83afa43b21d52f4c463f81 + m_Address: "AnimationConfig/\u8C03\u9152\u59B9\u6D4B\u8BD5" + m_ReadOnly: 0 + m_SerializedLabels: [] + FlaggedDuringContentUpdateRestriction: 0 m_ReadOnly: 0 m_Settings: {fileID: 11400000, guid: 77169ce22e430f64fb36c771815a4a7b, type: 2} m_SchemaSet: diff --git a/Assets/AddressableAssetsData/AssetGroups/Prefabs.asset b/Assets/AddressableAssetsData/AssetGroups/Prefabs.asset index 920f20836..d60c70247 100644 --- a/Assets/AddressableAssetsData/AssetGroups/Prefabs.asset +++ b/Assets/AddressableAssetsData/AssetGroups/Prefabs.asset @@ -92,6 +92,11 @@ MonoBehaviour: m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 + - m_GUID: 89fde357592cf2e44a0b73131b150869 + m_Address: ActorAnimaEx + m_ReadOnly: 0 + m_SerializedLabels: [] + FlaggedDuringContentUpdateRestriction: 0 m_ReadOnly: 0 m_Settings: {fileID: 11400000, guid: 77169ce22e430f64fb36c771815a4a7b, type: 2} m_SchemaSet: diff --git a/Assets/AddressableAssetsData/link.xml b/Assets/AddressableAssetsData/link.xml deleted file mode 100644 index 1520e4093..000000000 --- a/Assets/AddressableAssetsData/link.xml +++ /dev/null @@ -1,559 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Assets/Editor/Window/AnimationClipGenerator.cs b/Assets/Editor/Window/AnimationClipGenerator.cs index 4b3b1b390..9788b5545 100644 --- a/Assets/Editor/Window/AnimationClipGenerator.cs +++ b/Assets/Editor/Window/AnimationClipGenerator.cs @@ -19,6 +19,23 @@ namespace AibisDream.SystemEditor } private AnimationTargetType animationType = AnimationTargetType.SpriteRenderer; + // Pivot 设置选项 + private enum PivotAlignment + { + Center, // 中心 (0.5, 0.5) + TopLeft, // 左上 (0, 1) + TopRight, // 右上 (1, 1) + BottomLeft, // 左下 (0, 0) + BottomRight, // 右下 (1, 0) + TopCenter, // 上中 (0.5, 1) + BottomCenter, // 下中 (0.5, 0) + LeftCenter, // 左中 (0, 0.5) + RightCenter, // 右中 (1, 0.5) + Custom // 自定义 + } + private PivotAlignment pivotAlignment = PivotAlignment.Center; + private Vector2 customPivot = new Vector2(0.5f, 0.5f); + [MenuItem("Tools/动画片段生成器(Animation Clip Generator)")] public static void ShowWindow() { @@ -53,6 +70,32 @@ namespace AibisDream.SystemEditor EditorGUILayout.Space(); + // Pivot 设置 + EditorGUILayout.LabelField("Pivot 设置", EditorStyles.boldLabel); + pivotAlignment = (PivotAlignment)EditorGUILayout.EnumPopup( + "Pivot Alignment", pivotAlignment); + + if (pivotAlignment == PivotAlignment.Custom) + { + customPivot = EditorGUILayout.Vector2Field("Custom Pivot", customPivot); + // 限制 pivot 值在 0-1 范围内 + customPivot.x = Mathf.Clamp01(customPivot.x); + customPivot.y = Mathf.Clamp01(customPivot.y); + EditorGUILayout.HelpBox( + "自定义 Pivot 值范围: X 和 Y 应在 0-1 之间\n" + + "例如: (0, 0) = 左下角, (0.5, 0.5) = 中心, (1, 1) = 右上角", + MessageType.Info); + } + else + { + Vector2 previewPivot = GetPivotFromAlignment(pivotAlignment); + EditorGUILayout.HelpBox( + $"当前 Pivot: ({previewPivot.x:F2}, {previewPivot.y:F2})", + MessageType.Info); + } + + EditorGUILayout.Space(); + // 输出目录选择 EditorGUILayout.LabelField("输出目录", EditorStyles.boldLabel); outputFolder = (DefaultAsset)EditorGUILayout.ObjectField( @@ -114,7 +157,13 @@ namespace AibisDream.SystemEditor try { bool isImageAnimation = animationType == AnimationTargetType.Image; - AnimationClipGeneratorCore.GenerateClips(texturePath, jsonPath, outputPath, isImageAnimation); + Vector2 pivot = pivotAlignment == PivotAlignment.Custom + ? customPivot + : GetPivotFromAlignment(pivotAlignment); + // 确保 pivot 值在有效范围内 + pivot.x = Mathf.Clamp01(pivot.x); + pivot.y = Mathf.Clamp01(pivot.y); + AnimationClipGeneratorCore.GenerateClips(texturePath, jsonPath, outputPath, isImageAnimation, pivot); EditorUtility.DisplayDialog("成功", $"AnimationClip已生成到: {outputPath}", "确定"); // 刷新资源数据库 @@ -126,5 +175,34 @@ namespace AibisDream.SystemEditor Debug.LogError(e); } } + + private Vector2 GetPivotFromAlignment(PivotAlignment alignment) + { + switch (alignment) + { + case PivotAlignment.Center: + return new Vector2(0.5f, 0.5f); + case PivotAlignment.TopLeft: + return new Vector2(0f, 1f); + case PivotAlignment.TopRight: + return new Vector2(1f, 1f); + case PivotAlignment.BottomLeft: + return new Vector2(0f, 0f); + case PivotAlignment.BottomRight: + return new Vector2(1f, 0f); + case PivotAlignment.TopCenter: + return new Vector2(0.5f, 1f); + case PivotAlignment.BottomCenter: + return new Vector2(0.5f, 0f); + case PivotAlignment.LeftCenter: + return new Vector2(0f, 0.5f); + case PivotAlignment.RightCenter: + return new Vector2(1f, 0.5f); + case PivotAlignment.Custom: + return customPivot; + default: + return new Vector2(0.5f, 0.5f); + } + } } } \ No newline at end of file diff --git a/Assets/Editor/Window/AnimationClipGeneratorCore.cs b/Assets/Editor/Window/AnimationClipGeneratorCore.cs index 19c160ceb..afc7d1ca1 100644 --- a/Assets/Editor/Window/AnimationClipGeneratorCore.cs +++ b/Assets/Editor/Window/AnimationClipGeneratorCore.cs @@ -353,7 +353,7 @@ namespace AibisDream.SystemEditor } // 根据JSON信息切图 - public static void SliceSprites(string texturePath, List frames) + public static void SliceSprites(string texturePath, List frames, Vector2 pivot) { TextureImporter textureImporter = AssetImporter.GetAtPath(texturePath) as TextureImporter; if (textureImporter == null) @@ -397,12 +397,33 @@ namespace AibisDream.SystemEditor // Unity Y = 纹理高度 - (原始Y + 高度) float unityY = textureHeight - (frame.y + frame.height); + // 根据 pivot 值确定 alignment + SpriteAlignment alignment = SpriteAlignment.Custom; + if (pivot == new Vector2(0.5f, 0.5f)) + alignment = SpriteAlignment.Center; + else if (pivot == new Vector2(0f, 1f)) + alignment = SpriteAlignment.TopLeft; + else if (pivot == new Vector2(1f, 1f)) + alignment = SpriteAlignment.TopRight; + else if (pivot == new Vector2(0f, 0f)) + alignment = SpriteAlignment.BottomLeft; + else if (pivot == new Vector2(1f, 0f)) + alignment = SpriteAlignment.BottomRight; + else if (pivot == new Vector2(0.5f, 1f)) + alignment = SpriteAlignment.TopCenter; + else if (pivot == new Vector2(0.5f, 0f)) + alignment = SpriteAlignment.BottomCenter; + else if (pivot == new Vector2(0f, 0.5f)) + alignment = SpriteAlignment.LeftCenter; + else if (pivot == new Vector2(1f, 0.5f)) + alignment = SpriteAlignment.RightCenter; + spriteRects[i] = new SpriteRect { name = frame.name, rect = new Rect(frame.x, unityY, frame.width, frame.height), - pivot = new Vector2(0.5f, 0.5f), - alignment = SpriteAlignment.Center + pivot = pivot, + alignment = alignment }; } @@ -511,8 +532,16 @@ namespace AibisDream.SystemEditor } // 主流程:生成AnimationClip - public static void GenerateClips(string texturePath, string jsonPath, string outputPath, bool isImageAnimation = false) + public static void GenerateClips(string texturePath, string jsonPath, string outputPath, bool isImageAnimation = false, Vector2 pivot = default) { + // 如果没有提供 pivot,使用默认值(中心) + if (pivot == default) + { + pivot = new Vector2(0.5f, 0.5f); + } + // 确保 pivot 值在有效范围内 + pivot.x = Mathf.Clamp01(pivot.x); + pivot.y = Mathf.Clamp01(pivot.y); try { EditorUtility.DisplayProgressBar("生成AnimationClip", "检查SpriteMode...", 0f); @@ -546,7 +575,7 @@ namespace AibisDream.SystemEditor // 如果是Single模式,需要切图 if (spriteMode == SpriteImportMode.Single) { - SliceSprites(texturePath, processedData.frames); + SliceSprites(texturePath, processedData.frames, pivot); // 重新加载以确保sprites可用 AssetDatabase.Refresh(); } diff --git a/Assets/Editor/Window/AnimatorBlendTreeParserWindow.cs b/Assets/Editor/Window/AnimatorBlendTreeParserWindow.cs new file mode 100644 index 000000000..8e4132d53 --- /dev/null +++ b/Assets/Editor/Window/AnimatorBlendTreeParserWindow.cs @@ -0,0 +1,234 @@ +using System; +using System.Collections.Generic; +using System.IO; +using AibisDream.Framework; +using Newtonsoft.Json; +using UnityEditor; +using UnityEditor.Animations; +using UnityEngine; + +namespace AibisDream.SystemEditor +{ + public class AnimatorBlendTreeParserWindow : EditorWindow + { + private AnimatorController _selectedController; + private List _blendTreeInfos; + private Vector2 _scrollPosition; + private string _resultText = ""; + + [MenuItem("Tools/Animator BlendTree Parser")] + public static void ShowWindow() + { + GetWindow("BlendTree Parser"); + } + + private void OnGUI() + { + EditorGUILayout.Space(10); + + // AnimatorController 选择区域 + EditorGUILayout.LabelField("AnimatorController", EditorStyles.boldLabel); + _selectedController = (AnimatorController)EditorGUILayout.ObjectField( + "Controller", _selectedController, typeof(AnimatorController), false); + + EditorGUILayout.Space(10); + + // 解析按钮 + EditorGUI.BeginDisabledGroup(_selectedController == null); + if (GUILayout.Button("解析混合树", GUILayout.Height(30))) + { + ParseBlendTree(); + } + EditorGUI.EndDisabledGroup(); + + EditorGUILayout.Space(10); + + // 结果显示区域 + if (_blendTreeInfos != null && _blendTreeInfos.Count > 0) + { + EditorGUILayout.LabelField("解析结果", EditorStyles.boldLabel); + + // 显示统计信息 + EditorGUILayout.HelpBox( + $"共找到 {_blendTreeInfos.Count} 个混合树", + MessageType.Info); + + // 可滚动的文本区域 + _scrollPosition = EditorGUILayout.BeginScrollView(_scrollPosition, GUILayout.ExpandHeight(true)); + EditorGUILayout.TextArea(_resultText, GUILayout.ExpandHeight(true)); + EditorGUILayout.EndScrollView(); + + EditorGUILayout.Space(10); + + // 保存 JSON 按钮 + if (GUILayout.Button("保存为 JSON", GUILayout.Height(30))) + { + SaveToJson(); + } + } + else if (_blendTreeInfos != null && _blendTreeInfos.Count == 0) + { + EditorGUILayout.HelpBox( + "未找到混合树", + MessageType.Warning); + } + } + + private void ParseBlendTree() + { + if (_selectedController == null) + { + EditorUtility.DisplayDialog("错误", "请先选择 AnimatorController", "确定"); + return; + } + + try + { + // 调用解析方法(不输出到控制台,只返回结果) + _blendTreeInfos = AnimatorKit.ParseBlendTree(_selectedController); + + // 格式化结果显示文本 + FormatResultText(); + + Debug.Log($"解析完成: 找到 {_blendTreeInfos.Count} 个混合树"); + } + catch (Exception e) + { + EditorUtility.DisplayDialog("解析失败", e.Message, "确定"); + Debug.LogError($"解析失败: {e}"); + _blendTreeInfos = null; + _resultText = ""; + } + } + + private void FormatResultText() + { + if (_blendTreeInfos == null || _blendTreeInfos.Count == 0) + { + _resultText = "未找到混合树"; + return; + } + + var lines = new List(); + lines.Add($"=== 控制器 {_selectedController.name} 的混合树信息 ==="); + lines.Add($"共找到 {_blendTreeInfos.Count} 个混合树\n"); + + for (int i = 0; i < _blendTreeInfos.Count; i++) + { + var info = _blendTreeInfos[i]; + lines.Add($"[{i + 1}] 混合树名称: {info.name}"); + lines.Add($" 类型: {info.type}"); + + if (info.type == "1D") + { + lines.Add($" 动画片段数量: {info.clipCount}"); + lines.Add($" 混合参数: {info.blendParameter}"); + lines.Add($" 参数范围: [{info.minThreshold}, {info.maxThreshold}]"); + lines.Add($" 动画片段列表 ({info.clips?.Count ?? 0} 个):"); + if (info.clips != null) + { + for (int j = 0; j < info.clips.Count; j++) + { + var clip = info.clips[j]; + lines.Add($" [{j + 1}] {clip.clipName} (Threshold: {clip.threshold})"); + } + } + } + else if (info.type == "2D") + { + lines.Add($" 混合参数 X: {info.blendParameter}"); + lines.Add($" 混合参数 Y: {info.blendParameterY}"); + lines.Add($" 参数范围: [{info.minThreshold}, {info.maxThreshold}]"); + lines.Add($" 动画片段列表 ({info.clips?.Count ?? 0} 个):"); + if (info.clips != null) + { + for (int j = 0; j < info.clips.Count; j++) + { + var clip = info.clips[j]; + lines.Add($" [{j + 1}] {clip.clipName} (位置: {clip.position})"); + } + } + } + else + { + lines.Add($" 动画片段数量: {info.clipCount}"); + } + + if (i < _blendTreeInfos.Count - 1) + { + lines.Add(""); + } + } + + _resultText = string.Join("\n", lines); + } + + private void SaveToJson() + { + if (_selectedController == null || _blendTreeInfos == null || _blendTreeInfos.Count == 0) + { + EditorUtility.DisplayDialog("错误", "没有可保存的数据", "确定"); + return; + } + + try + { + // 获取 AnimatorController 的资产路径 + string controllerPath = AssetDatabase.GetAssetPath(_selectedController); + if (string.IsNullOrEmpty(controllerPath)) + { + EditorUtility.DisplayDialog("错误", "无法获取 AnimatorController 的路径", "确定"); + return; + } + + // 生成 JSON 文件路径(与 .controller 文件同名同路径,扩展名为 .json) + string directory = Path.GetDirectoryName(controllerPath); + string fileName = Path.GetFileNameWithoutExtension(controllerPath); + string jsonPath = Path.Combine(directory, $"{fileName}.json"); + + // 转换为 Unity 资源路径格式 + jsonPath = jsonPath.Replace("\\", "/"); + if (!jsonPath.StartsWith("Assets/")) + { + // 如果不是 Assets 路径,尝试转换 + string fullPath = Path.GetFullPath(jsonPath); + string assetsPath = Path.GetFullPath(Application.dataPath); + if (fullPath.StartsWith(assetsPath)) + { + jsonPath = "Assets" + fullPath.Substring(assetsPath.Length).Replace("\\", "/"); + } + else + { + EditorUtility.DisplayDialog("错误", "JSON 文件路径必须在 Assets 目录下", "确定"); + return; + } + } + + // 配置序列化设置,忽略循环引用 + var settings = new JsonSerializerSettings + { + ReferenceLoopHandling = ReferenceLoopHandling.Ignore, + Formatting = Formatting.Indented + }; + + // 序列化为 JSON + string jsonContent = JsonConvert.SerializeObject(_blendTreeInfos, settings); + + // 写入文件(如果已存在则覆盖) + File.WriteAllText(jsonPath, jsonContent, System.Text.Encoding.UTF8); + + // 刷新资源数据库 + AssetDatabase.Refresh(); + + EditorUtility.DisplayDialog("保存成功", $"JSON 文件已保存到:\n{jsonPath}", "确定"); + Debug.Log($"JSON 文件已保存: {jsonPath}"); + } + catch (Exception e) + { + EditorUtility.DisplayDialog("保存失败", e.Message, "确定"); + Debug.LogError($"保存 JSON 失败: {e}"); + } + } + } +} + diff --git a/Assets/Scripts/Framework/Utility/SpriteMerger.cs.meta b/Assets/Editor/Window/AnimatorBlendTreeParserWindow.cs.meta similarity index 83% rename from Assets/Scripts/Framework/Utility/SpriteMerger.cs.meta rename to Assets/Editor/Window/AnimatorBlendTreeParserWindow.cs.meta index 042105fe6..c31483c93 100644 --- a/Assets/Scripts/Framework/Utility/SpriteMerger.cs.meta +++ b/Assets/Editor/Window/AnimatorBlendTreeParserWindow.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: df93985af708ffa4da967cda77ed45a6 +guid: 7376797afa65fb549b5347e5d570dc46 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/Prefabs/FixSystemPrefabs/ActorAnimaEx.prefab b/Assets/Prefabs/FixSystemPrefabs/ActorAnimaEx.prefab new file mode 100644 index 000000000..3c931c8b4 --- /dev/null +++ b/Assets/Prefabs/FixSystemPrefabs/ActorAnimaEx.prefab @@ -0,0 +1,131 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &3587091107950792101 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4842914929887773409} + - component: {fileID: 5147120309788979275} + - component: {fileID: 6457534782112409331} + - component: {fileID: 7453838178603909510} + m_Layer: 0 + m_Name: ActorAnimaEx + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4842914929887773409 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3587091107950792101} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -2.6, y: -5, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &5147120309788979275 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3587091107950792101} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 0 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 941243827 + m_SortingLayer: 13 + m_SortingOrder: 120 + m_Sprite: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 7.4651165, y: 9.930233} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 0 + m_MaskInteraction: 0 + m_SpriteSortPoint: 1 +--- !u!95 &6457534782112409331 +Animator: + serializedVersion: 5 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3587091107950792101} + m_Enabled: 1 + m_Avatar: {fileID: 0} + m_Controller: {fileID: 0} + 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!114 &7453838178603909510 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3587091107950792101} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 79080239c808e074cbbffada2dd2045b, type: 3} + m_Name: + m_EditorClassIdentifier: + actorData: + onSave: + m_PersistentCalls: + m_Calls: [] + actorName: + slotName: + actorType: 0 + stateName: + alpha: 0 + faceParam: 0 diff --git a/Assets/Prefabs/FixSystemPrefabs/ActorAnimaEx.prefab.meta b/Assets/Prefabs/FixSystemPrefabs/ActorAnimaEx.prefab.meta new file mode 100644 index 000000000..955680c22 --- /dev/null +++ b/Assets/Prefabs/FixSystemPrefabs/ActorAnimaEx.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 89fde357592cf2e44a0b73131b150869 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/RawResources/动画测试/SpriteMergerTest.cs b/Assets/RawResources/动画测试/SpriteMergerTest.cs deleted file mode 100644 index 4763c0087..000000000 --- a/Assets/RawResources/动画测试/SpriteMergerTest.cs +++ /dev/null @@ -1,51 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using AibisDream.Framework; -using AibisDream.Utility; -using DG.Tweening; - -namespace AibisDream -{ - public class SpriteMergerTest : MonoBehaviour - { - private SpriteRenderer[] _spriteRenderers; - - void Awake() - { - _spriteRenderers = GetComponentsInChildren(); - } - - void Update() - { - if (Input.GetKeyDown(KeyCode.Space)) - { - var mergedRenderer = MergeSprites(); - // // 隐藏其他SpriteRenderer - // foreach (var renderer in _spriteRenderers) - // { - // renderer.SetAlpha(0f); - // // 淡出合并后的SpriteRenderer - // } - - // mergedRenderer.DOFade(0f, 1f); - } - } - - private SpriteRenderer MergeSprites() - { - var mergeResult = SpriteMerger.MergeSpriteRenderers(_spriteRenderers, 0, 0, 200f); - // 生成新的SpriteRenderer - var obj = new GameObject("MergedSprite"); - obj.transform.parent = transform; - obj.transform.position = mergeResult.worldPosition; - var spriteRenderer = obj.AddComponent(); - spriteRenderer.sprite = mergeResult.sprite; - - spriteRenderer.sortingOrder = 100; - spriteRenderer.sortingLayerName = "Default"; - - return spriteRenderer; - } - } -} diff --git a/Assets/RawResources/动画测试/动作序列/说话到俯身.png.meta b/Assets/RawResources/动画测试/动作序列/说话到俯身.png.meta index b5e9d7f3d..301b423e3 100644 --- a/Assets/RawResources/动画测试/动作序列/说话到俯身.png.meta +++ b/Assets/RawResources/动画测试/动作序列/说话到俯身.png.meta @@ -156,8 +156,8 @@ TextureImporter: y: 150 width: 74 height: 150 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] @@ -177,8 +177,8 @@ TextureImporter: y: 150 width: 74 height: 150 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] @@ -198,8 +198,8 @@ TextureImporter: y: 150 width: 74 height: 150 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] @@ -219,8 +219,8 @@ TextureImporter: y: 150 width: 74 height: 150 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] @@ -240,8 +240,8 @@ TextureImporter: y: 150 width: 74 height: 150 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] @@ -261,8 +261,8 @@ TextureImporter: y: 150 width: 74 height: 150 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] @@ -282,8 +282,8 @@ TextureImporter: y: 0 width: 74 height: 150 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] @@ -303,8 +303,8 @@ TextureImporter: y: 0 width: 74 height: 150 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] @@ -324,8 +324,8 @@ TextureImporter: y: 0 width: 74 height: 150 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] @@ -345,8 +345,8 @@ TextureImporter: y: 0 width: 74 height: 150 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] diff --git a/Assets/RawResources/动画测试/状态序列/调酒妹俯身动作.png.meta b/Assets/RawResources/动画测试/状态序列/调酒妹俯身动作.png.meta index ffc45298d..4d5a102c9 100644 --- a/Assets/RawResources/动画测试/状态序列/调酒妹俯身动作.png.meta +++ b/Assets/RawResources/动画测试/状态序列/调酒妹俯身动作.png.meta @@ -156,14 +156,14 @@ TextureImporter: y: 592 width: 74 height: 148 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: bd026f2385b92fe409a08b8a154c1e31 + spriteID: caf332a0dc2c74949b312a18860a6bcb internalID: 6274146887553740211 vertices: [] indices: @@ -177,14 +177,14 @@ TextureImporter: y: 592 width: 74 height: 148 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 7af5fbc90137bb2429fb3a657a57fe6f + spriteID: 575dd4fca879f78479e1105521268f65 internalID: -2497767602542790718 vertices: [] indices: @@ -198,14 +198,14 @@ TextureImporter: y: 592 width: 74 height: 148 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 7f04b678d8fb6f74d9a3177c2ef11525 + spriteID: c6b6bdd7cb7178643a5e8b05f2a5628e internalID: 7505705003434691304 vertices: [] indices: @@ -219,14 +219,14 @@ TextureImporter: y: 592 width: 74 height: 148 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 23c15564e4f4093478b936e9e08e0166 + spriteID: 35487e54c087de441ae3c3a1f500353f internalID: 2978398801024682803 vertices: [] indices: @@ -240,14 +240,14 @@ TextureImporter: y: 592 width: 74 height: 148 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 61c7b1f79e691294e84cb7a9c10b06aa + spriteID: efa47bef063897f42a65bc41d1e52098 internalID: 3966022836320307748 vertices: [] indices: @@ -261,14 +261,14 @@ TextureImporter: y: 592 width: 74 height: 148 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 43b43f86c6887174284675ee5fa5a1fa + spriteID: ea0b5952d6d67164696dfa51c28284e7 internalID: 8666308110037801578 vertices: [] indices: @@ -282,14 +282,14 @@ TextureImporter: y: 592 width: 74 height: 148 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 95c42055c0995f54781cb67c8f69079d + spriteID: c78286a433bff954ebe178e6d1abd369 internalID: 6571823203914188059 vertices: [] indices: @@ -303,14 +303,14 @@ TextureImporter: y: 592 width: 74 height: 148 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 702fb7f652ff0b547abdc5a474f3ee55 + spriteID: 2b6d1786ad6eea74c9e7deb71c3ad8c9 internalID: -7633519957392125473 vertices: [] indices: @@ -324,14 +324,14 @@ TextureImporter: y: 592 width: 74 height: 148 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 300220cddccaae14f99e94b95745283b + spriteID: 2a231cb6dcdfa4d40b142c525b537572 internalID: 2296540948558466867 vertices: [] indices: @@ -345,14 +345,14 @@ TextureImporter: y: 592 width: 74 height: 148 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: ba564e1096bd403469519f9629add4e6 + spriteID: a6be3133d41cdc24587e6a248c175648 internalID: -358538569034646910 vertices: [] indices: @@ -366,14 +366,14 @@ TextureImporter: y: 592 width: 74 height: 148 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: ecfa5c6dc3a78c1488c3b839dce8e3d5 + spriteID: da4b8864eab377049a9469ef2a0d64dc internalID: -2164066859034282669 vertices: [] indices: @@ -387,14 +387,14 @@ TextureImporter: y: 592 width: 74 height: 148 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 090128da8f0854d439d5fbf678d0ac43 + spriteID: 63c8660a0dd5fe944bb3da948b8cab72 internalID: -3874172588712466993 vertices: [] indices: @@ -408,14 +408,14 @@ TextureImporter: y: 592 width: 74 height: 148 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 0be72d740d275ac4199cfaba6ab29c0e + spriteID: 798b14dec66eb824bb458554d4875069 internalID: -1968574284601027680 vertices: [] indices: @@ -429,14 +429,14 @@ TextureImporter: y: 444 width: 74 height: 148 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 2169088e9bc4260469a56c4fdcf6c540 + spriteID: a7aa9037ebd332a4a865ba2e122bfb86 internalID: 7793715949762462440 vertices: [] indices: @@ -450,14 +450,14 @@ TextureImporter: y: 444 width: 74 height: 148 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 065fb41070bde8b4d9f7553d7dcb8058 + spriteID: a309bea04a792e746ad74669acf13687 internalID: -5753328854005916102 vertices: [] indices: @@ -471,14 +471,14 @@ TextureImporter: y: 444 width: 74 height: 148 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: cee430d4af3b2b64e9b4289661711fdf + spriteID: 108ba3c677b75bf49bc16ab244d80128 internalID: 6925026437316286158 vertices: [] indices: @@ -492,14 +492,14 @@ TextureImporter: y: 444 width: 74 height: 148 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 59b4b10c49568e34daf3a3ec64a5b292 + spriteID: 60ed1e3c4131bfe42b169188b378f13c internalID: 8191706188701297812 vertices: [] indices: @@ -513,14 +513,14 @@ TextureImporter: y: 444 width: 74 height: 148 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 9b18ea350f3b1dc43a4326f6c2210004 + spriteID: 64bd1ad92244da949be0011a5cc325d8 internalID: -6454103067394847357 vertices: [] indices: @@ -534,14 +534,14 @@ TextureImporter: y: 444 width: 74 height: 148 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 35fc09133d6a2c8499dcd3cc4de2a9dd + spriteID: 1daad409798ff624e8dab8e85f85853e internalID: -6727436497457488714 vertices: [] indices: @@ -555,14 +555,14 @@ TextureImporter: y: 444 width: 74 height: 148 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: e54abc27016757e41b396e7b5e22ec8f + spriteID: 4b073d971aa763d4e870373a33d698d3 internalID: -6104734517239034491 vertices: [] indices: @@ -576,14 +576,14 @@ TextureImporter: y: 444 width: 74 height: 148 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 80600472ec3ed03498d5d26773676be1 + spriteID: 1c6912f58e8063b468a7a229696290ed internalID: 7465421925448682398 vertices: [] indices: @@ -597,14 +597,14 @@ TextureImporter: y: 444 width: 74 height: 148 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 6e5fd12ecedbb5543add59923eba4c6d + spriteID: 9b3d2bbd0da8d8c4994e20fa7d3411db internalID: -884803905218116710 vertices: [] indices: @@ -618,14 +618,14 @@ TextureImporter: y: 444 width: 74 height: 148 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: a304703c7c49b044db70910320d51ef4 + spriteID: 467cd9a5c8a61964c98ff41e827b4ac1 internalID: -7441323792256590251 vertices: [] indices: @@ -639,14 +639,14 @@ TextureImporter: y: 444 width: 74 height: 148 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: aa2e2440d1f9e0e46a917b6b42525407 + spriteID: 7bef5bbcd2e5a9641b569ca7267f7326 internalID: -4402069188517434129 vertices: [] indices: @@ -660,14 +660,14 @@ TextureImporter: y: 444 width: 74 height: 148 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 75d46dde6e704c3428491d1c8e0303b9 + spriteID: 75b3a48bd4b871d4ba50ce37b658afd9 internalID: -6537978176987858858 vertices: [] indices: @@ -681,14 +681,14 @@ TextureImporter: y: 444 width: 74 height: 148 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: c8069a317977b444b92fc0a137b5b844 + spriteID: a7f40bbec7901634eb5fd6acb4088b82 internalID: 3584370522204050824 vertices: [] indices: @@ -702,14 +702,14 @@ TextureImporter: y: 296 width: 74 height: 148 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 051d15e5948afd74688726aa275f1046 + spriteID: fb286731ce839c1438af71ce2c5359f9 internalID: -3333204868569386313 vertices: [] indices: @@ -723,14 +723,14 @@ TextureImporter: y: 296 width: 74 height: 148 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: f07605c3a9da45044ae1cd5d91daf568 + spriteID: 2f6d5357912776742996332f6d64cbcf internalID: 8351428831710608577 vertices: [] indices: @@ -744,14 +744,14 @@ TextureImporter: y: 296 width: 74 height: 148 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 7650ed3bb3e216748a6c2eb15deb3f75 + spriteID: 4936808c35db2a240b6ec3a2a08bdb42 internalID: 4846965227430674274 vertices: [] indices: @@ -765,14 +765,14 @@ TextureImporter: y: 296 width: 74 height: 148 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 394266d8290b44249b7fb41181779bb0 + spriteID: b1a85d4b6ee3a21478a46568918715cc internalID: 2294096650098582563 vertices: [] indices: @@ -786,14 +786,14 @@ TextureImporter: y: 296 width: 74 height: 148 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: dd5b0ddb7abe7874baf332c2d20ec364 + spriteID: c6f93a1f1cb24294aa155ce71087395c internalID: -4454583114723981528 vertices: [] indices: @@ -807,14 +807,14 @@ TextureImporter: y: 296 width: 74 height: 148 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: bc43ea450f02a5c45a2ad9e9c3f34acf + spriteID: 33d448e096a3a694db35975621749e97 internalID: 8220211609130732006 vertices: [] indices: @@ -828,14 +828,14 @@ TextureImporter: y: 296 width: 74 height: 148 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 46ee29ebe7705f746bb33154e4cb08e1 + spriteID: b3c444c809a42ea4099c00d8133f7491 internalID: -1972715319808633564 vertices: [] indices: @@ -849,14 +849,14 @@ TextureImporter: y: 296 width: 74 height: 148 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 901de75e09dc9874b83a77926da1e5a6 + spriteID: 01a100f3d71d39640bfe6447f779699b internalID: 4563823543396612806 vertices: [] indices: @@ -870,14 +870,14 @@ TextureImporter: y: 296 width: 74 height: 148 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 31845c54ea228bf43bda4ba449fd4c7a + spriteID: 7af2b943fc43d5943af802cebc368073 internalID: -7727229314242437691 vertices: [] indices: @@ -891,14 +891,14 @@ TextureImporter: y: 296 width: 74 height: 148 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 3832689a3517da841acd0344b1deb3d0 + spriteID: 671d7eb6c58f1c94489e4499f36cc6e2 internalID: -3389362039129957260 vertices: [] indices: @@ -912,14 +912,14 @@ TextureImporter: y: 296 width: 74 height: 148 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: bfd7257d90f93364093534cdd89bdcc3 + spriteID: 7d6cb9d40d7c7d94cbf2822d5b16c5be internalID: 6837560215248355484 vertices: [] indices: @@ -933,14 +933,14 @@ TextureImporter: y: 296 width: 74 height: 148 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: bdfe23a569ca75d4e9cbb0f5fd3020fe + spriteID: 9039e0bc0d0a1f442b161f01c02993a1 internalID: -4769823188421903293 vertices: [] indices: @@ -954,14 +954,14 @@ TextureImporter: y: 296 width: 74 height: 148 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: a98d67a73d7a04d4f829d346840fd998 + spriteID: 9ba3b640443a42540be88a7b1e68cff3 internalID: 1974943674533331560 vertices: [] indices: @@ -975,14 +975,14 @@ TextureImporter: y: 148 width: 74 height: 148 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 63af7172d7b8ad34c95bfeb588eb33bb + spriteID: b89a9ea1de3428f409561454fb4dc666 internalID: -1477227054218896229 vertices: [] indices: @@ -996,14 +996,14 @@ TextureImporter: y: 148 width: 74 height: 148 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: e5a5f3979bd878744bb3e9aab3463c73 + spriteID: 025ffa1db95303a4cb567556485cb856 internalID: -1229261959393106462 vertices: [] indices: @@ -1017,14 +1017,14 @@ TextureImporter: y: 148 width: 74 height: 148 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 8f41be9c2b607194b823cbc750245e3f + spriteID: 60da4210cbed73a4382c00d12451f739 internalID: 6142804223379559329 vertices: [] indices: @@ -1038,14 +1038,14 @@ TextureImporter: y: 148 width: 74 height: 148 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 9764d10c9617ca84f9800a6fefab7b4d + spriteID: cde6b65f58f62d74a886f8bd63ff95de internalID: -7938737748736518634 vertices: [] indices: @@ -1059,14 +1059,14 @@ TextureImporter: y: 148 width: 74 height: 148 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: eb99db7239c34e74697354cfcbfb7b37 + spriteID: 03e3682c9517d224892b8eec3e0681bc internalID: -9102536122399809253 vertices: [] indices: @@ -1080,14 +1080,14 @@ TextureImporter: y: 148 width: 74 height: 148 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: d34f8144e8f99234e80a69c801b53aee + spriteID: 130027f431ea1554aaf116bf496cad62 internalID: 706752457227403780 vertices: [] indices: @@ -1101,14 +1101,14 @@ TextureImporter: y: 148 width: 74 height: 148 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: c2b1c053dfd8fc146b1d5382c76f1bdd + spriteID: 8e5177a202ac1ef4596c7c8f7d831850 internalID: -5457473623779570638 vertices: [] indices: @@ -1122,14 +1122,14 @@ TextureImporter: y: 148 width: 74 height: 148 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: e905f318b95577b4d971aabe5f9c2c49 + spriteID: fae52869a05d5cb4bbf7a0ae2f92b0cd internalID: -6884182482073045250 vertices: [] indices: @@ -1143,14 +1143,14 @@ TextureImporter: y: 148 width: 74 height: 148 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: a210db7c656029d4ea2182f6289dfb86 + spriteID: f8e2845602bd76740ad993e3cb5a2545 internalID: 4835922001024975659 vertices: [] indices: @@ -1164,14 +1164,14 @@ TextureImporter: y: 148 width: 74 height: 148 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 2ddbb44b05185ca44924fa39afebbb2c + spriteID: 0a0fd4bb9f358254e9d05126ebd3c3c5 internalID: 5990153973912342097 vertices: [] indices: @@ -1185,14 +1185,14 @@ TextureImporter: y: 148 width: 74 height: 148 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 21d7fb23be9a90d4f91993c19704d7e5 + spriteID: 684374b1e5f8c1a4aabde711b0fcd0b8 internalID: -5215455245759449113 vertices: [] indices: @@ -1206,14 +1206,14 @@ TextureImporter: y: 148 width: 74 height: 148 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: ef4d31a2a7bc2d947a33517858203107 + spriteID: 8969e928f2a90e9439f14e8af6730851 internalID: 6516611365795186837 vertices: [] indices: @@ -1227,14 +1227,14 @@ TextureImporter: y: 148 width: 74 height: 148 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 2d68445ff10094a4b98e21403623b6fe + spriteID: 430d442a76c3c95498ed49ddf5524fae internalID: 315541716787263363 vertices: [] indices: @@ -1248,14 +1248,14 @@ TextureImporter: y: 0 width: 74 height: 148 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 2e2e32509de0a27429328920b3f272bc + spriteID: ffe9524a216bc2b4eb648218e9f8825e internalID: -5556271868854813394 vertices: [] indices: @@ -1269,14 +1269,14 @@ TextureImporter: y: 0 width: 74 height: 148 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: a95ef4a9da08c78459fb9a3fe769b1f7 + spriteID: 9afcbda8a7275e848bfced137f793f58 internalID: 8899572263572053556 vertices: [] indices: @@ -1290,14 +1290,14 @@ TextureImporter: y: 0 width: 74 height: 148 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 58d9538f6e1382f4a80151a49706d833 + spriteID: 57d19af2e3012794f8ead8304470bd6a internalID: 2327327827221690673 vertices: [] indices: @@ -1311,14 +1311,14 @@ TextureImporter: y: 0 width: 74 height: 148 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: a7833ade417b98c4287d00bf8f607ea5 + spriteID: e8bfe750b8c6635498e7d4bf14576e2a internalID: 4292618062508683520 vertices: [] indices: @@ -1332,14 +1332,14 @@ TextureImporter: y: 0 width: 74 height: 148 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: dbd00f8701df6314e9b70486e33ca3d1 + spriteID: bfd6212b4312fae4ab8348a2e14edbdb internalID: -6836569626354159616 vertices: [] indices: @@ -1353,14 +1353,14 @@ TextureImporter: y: 0 width: 74 height: 148 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 8c1844a855edbab45a3306b4678dbeb8 + spriteID: 8a54e68888c817144a63d9c8cadff6cd internalID: 8854481483452823807 vertices: [] indices: @@ -1374,14 +1374,14 @@ TextureImporter: y: 0 width: 74 height: 148 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: afc6b93fe5d99714dad247097a17862c + spriteID: 31420b276b68c2c46ac1ff3c65761bea internalID: 6517161125726662209 vertices: [] indices: @@ -1395,14 +1395,14 @@ TextureImporter: y: 0 width: 74 height: 148 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 06bd98aaa731e524b92983e6d0c64251 + spriteID: 2f0ba156831cfc845b86565260161ae1 internalID: 3103987458333380400 vertices: [] indices: @@ -1416,14 +1416,14 @@ TextureImporter: y: 0 width: 74 height: 148 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 45a4f1ed384928345b48bc9fb65166ee + spriteID: e39074693a3d7c24e9ffcff5d069acb1 internalID: -8456061903778047511 vertices: [] indices: @@ -1437,14 +1437,14 @@ TextureImporter: y: 0 width: 74 height: 148 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 9a87b3bea3fc2bf4781375284c98a584 + spriteID: a8c39c54ace125e4b930ac7e3e057ce7 internalID: -7356303256010905450 vertices: [] indices: @@ -1458,14 +1458,14 @@ TextureImporter: y: 0 width: 74 height: 148 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 31961d089d7206b46a088e715942a7d2 + spriteID: c6a88e399b1ae1b4ea996d577cd2d7c4 internalID: 2308336104347287957 vertices: [] indices: @@ -1479,14 +1479,14 @@ TextureImporter: y: 0 width: 74 height: 148 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: d85e80869b7d80347957b5927bc5250e + spriteID: 5a80555bb9e156a4ca9687a3d518e743 internalID: 7547618491661147384 vertices: [] indices: diff --git a/Assets/RawResources/动画测试/状态序列/调酒妹呼吸动画.png.meta b/Assets/RawResources/动画测试/状态序列/调酒妹呼吸动画.png.meta index 25f28220a..4d998d6ce 100644 --- a/Assets/RawResources/动画测试/状态序列/调酒妹呼吸动画.png.meta +++ b/Assets/RawResources/动画测试/状态序列/调酒妹呼吸动画.png.meta @@ -156,14 +156,14 @@ TextureImporter: y: 660 width: 74 height: 165 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 7a036adb0fd3f7c49abd4acd54fe6069 + spriteID: 03006d08aad9d3342a7e3e3e4eedcd96 internalID: -8041404811159889394 vertices: [] indices: @@ -177,14 +177,14 @@ TextureImporter: y: 660 width: 74 height: 165 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: a78d4017dd72e6b4bb505cb03ef6b9ab + spriteID: 2ccd3ac0cca117948ac96571071afd3a internalID: -2312985713029958202 vertices: [] indices: @@ -198,14 +198,14 @@ TextureImporter: y: 660 width: 74 height: 165 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 3f499ce597de14a47884abe3ba68e46d + spriteID: d4d3856bdf3f60a4db35d1b38b3624c5 internalID: -1707364979157807507 vertices: [] indices: @@ -219,14 +219,14 @@ TextureImporter: y: 660 width: 74 height: 165 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 30d033d6da043d348bd0106e5e1af709 + spriteID: 96dcbb672f20a4e41bc330c63881a484 internalID: 5206175971383541238 vertices: [] indices: @@ -240,14 +240,14 @@ TextureImporter: y: 660 width: 74 height: 165 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: b78f02c728ee80542a589363eaefda7b + spriteID: 0c7b4ab69977fe542aa34dd32fcec582 internalID: -6442746067862036275 vertices: [] indices: @@ -261,14 +261,14 @@ TextureImporter: y: 660 width: 74 height: 165 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 5c3a47e2d12485a459d7600261e50fc1 + spriteID: dc800ea65db9a8944b21ff2a86f1ceee internalID: 3703418199875250551 vertices: [] indices: @@ -282,14 +282,14 @@ TextureImporter: y: 660 width: 74 height: 165 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: ab548bb9e01b4544f9af5363db0e682f + spriteID: 90c7a4e1b633e704ab6c7f43ef181269 internalID: 6414786516888929126 vertices: [] indices: @@ -303,14 +303,14 @@ TextureImporter: y: 660 width: 74 height: 165 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: e3371db6a8763bf4895069393b4cfb8f + spriteID: 18140060802d9fd4e9087c47decbe58b internalID: 6981172648852903583 vertices: [] indices: @@ -324,14 +324,14 @@ TextureImporter: y: 660 width: 74 height: 165 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 2382f2b15eb5e7446a8eab241999d168 + spriteID: 988a63ff89dba054f922fd4d0cb32f90 internalID: -5841434768567320057 vertices: [] indices: @@ -345,14 +345,14 @@ TextureImporter: y: 660 width: 74 height: 165 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 0857069e6a0ff294bafc503dacb25ba2 + spriteID: 0d13465b99b102a4186bd035566f7509 internalID: -5269314340845599029 vertices: [] indices: @@ -366,14 +366,14 @@ TextureImporter: y: 660 width: 74 height: 165 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 2bfdcadc76a203c49872724f1d92d640 + spriteID: 81229c975dcad9a4f9941a4e4230e002 internalID: -7859363708163538050 vertices: [] indices: @@ -387,14 +387,14 @@ TextureImporter: y: 660 width: 74 height: 165 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: ce2ca38ae6ad18c41956103f7c996172 + spriteID: 95ffadd7d53d67b4791f66c662e64be2 internalID: 5953353706187058957 vertices: [] indices: @@ -408,14 +408,14 @@ TextureImporter: y: 660 width: 74 height: 165 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 7b826714e92ef494cb75a2c92a7a53ef + spriteID: 49c8b054c6142a7459035ada50b8bf20 internalID: -6086120667919364675 vertices: [] indices: @@ -429,14 +429,14 @@ TextureImporter: y: 495 width: 74 height: 165 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 12643834ea52391408539cf8831bb517 + spriteID: 5aeb882dee14f3b42b41d2a718f1dcb0 internalID: -7933251544849615072 vertices: [] indices: @@ -450,14 +450,14 @@ TextureImporter: y: 495 width: 74 height: 165 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: ae29512612c91b9469c38f5ef921b9b7 + spriteID: 9c828822a6a7d7e41b39e69eb3df4f23 internalID: 8639339700533667779 vertices: [] indices: @@ -471,14 +471,14 @@ TextureImporter: y: 495 width: 74 height: 165 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 449c1931bf6c75949bf9e5bf31ac2b87 + spriteID: 461f1e44f696aa04ea56603da89bb2ee internalID: 1985786860975694566 vertices: [] indices: @@ -492,14 +492,14 @@ TextureImporter: y: 495 width: 74 height: 165 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: f288f65f7ac540c4da7765d7a6b2d190 + spriteID: 63e4360020f155844b481c327990be3f internalID: -1098810472194769803 vertices: [] indices: @@ -513,14 +513,14 @@ TextureImporter: y: 495 width: 74 height: 165 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 21ed144d0ecabc54d98f36a31ccf753f + spriteID: 3fcd3f8ca1a6d944f8ebd0a05322913c internalID: 8046554039070584978 vertices: [] indices: @@ -534,14 +534,14 @@ TextureImporter: y: 495 width: 74 height: 165 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 38e506f01145b5a4e8a101a81bec01dd + spriteID: bab77234c61aa1c408dd347bc250cce4 internalID: 6855169401606473523 vertices: [] indices: @@ -555,14 +555,14 @@ TextureImporter: y: 495 width: 74 height: 165 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: e391aaa9d3781b541a794456b601bf4a + spriteID: a8800ad8da7b8394e9065ff738589554 internalID: -3610388766438024707 vertices: [] indices: @@ -576,14 +576,14 @@ TextureImporter: y: 495 width: 74 height: 165 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 7762fe31233e828468462229c2376536 + spriteID: 74cd63151ea46574e81fdfa77d5d8b30 internalID: -7524320545469522335 vertices: [] indices: @@ -597,14 +597,14 @@ TextureImporter: y: 495 width: 74 height: 165 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 4f3eb5390e0da784497ecd35bca77ea2 + spriteID: c937ebf92a42d6f488dedbcaae236f8e internalID: -135079196823137523 vertices: [] indices: @@ -618,14 +618,14 @@ TextureImporter: y: 495 width: 74 height: 165 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 3bc651e118630d24f91ebd5327b86390 + spriteID: 3a876ccde3a8c21429137d17328b3f69 internalID: 6283575263858553377 vertices: [] indices: @@ -639,14 +639,14 @@ TextureImporter: y: 495 width: 74 height: 165 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 3e7029f731d9eb046a9af707e51138c0 + spriteID: ab28047697a4b034aa8a8606ae493172 internalID: -3392011026967872245 vertices: [] indices: @@ -660,14 +660,14 @@ TextureImporter: y: 495 width: 74 height: 165 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: ec9ac099e6f68834b99b26f087647dd4 + spriteID: 0433be7473b07084786e472457743df6 internalID: -8932798575502173321 vertices: [] indices: @@ -681,14 +681,14 @@ TextureImporter: y: 495 width: 74 height: 165 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: c58b57f6ac0f4cb4f9ed7fdb3a4e730a + spriteID: 1fa947c52fd01e745ae05e2a73e1f120 internalID: -5842886138858306327 vertices: [] indices: @@ -702,14 +702,14 @@ TextureImporter: y: 330 width: 74 height: 165 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 36345a078536de648847425d295f3827 + spriteID: 8369b74f02a57294cbf742d87073ed27 internalID: -165610834175438634 vertices: [] indices: @@ -723,14 +723,14 @@ TextureImporter: y: 330 width: 74 height: 165 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 9924c92ebf3fa61448209c2a736e8878 + spriteID: f3e83ebd1668f6e4c8ca66b3de7f37b2 internalID: 5941660695730444918 vertices: [] indices: @@ -744,14 +744,14 @@ TextureImporter: y: 330 width: 74 height: 165 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: deb1eca0ad277524f92d5f8dde8db6d5 + spriteID: 62be7fd4fa7bdac4f9cbca3e76fbf586 internalID: -1111747480477121346 vertices: [] indices: @@ -765,14 +765,14 @@ TextureImporter: y: 330 width: 74 height: 165 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 81a48dc938fabfb4ba57b34f9c8c8d44 + spriteID: fea4ccbb41b7235469023de463e73e22 internalID: 4196583061044682088 vertices: [] indices: @@ -786,14 +786,14 @@ TextureImporter: y: 330 width: 74 height: 165 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 6b368620af2be8941aefe7d5b806aca0 + spriteID: b416f9a4a956d6a40a0c6df55519aaae internalID: 5488541324788187572 vertices: [] indices: @@ -807,14 +807,14 @@ TextureImporter: y: 330 width: 74 height: 165 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: c4a78285e250a4b4da022c8264425ead + spriteID: 80033445d3c71be469b027676e83bd1c internalID: 1024652723833623107 vertices: [] indices: @@ -828,14 +828,14 @@ TextureImporter: y: 330 width: 74 height: 165 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 096c15eef1853a34e919ce5d9fdd390d + spriteID: 8c59a8690f72d4f40978509fc27dc57a internalID: 1872172011780690407 vertices: [] indices: @@ -849,14 +849,14 @@ TextureImporter: y: 330 width: 74 height: 165 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 4179211f6047cd848b7eec0e9ba6efa7 + spriteID: 2a1f78598ec0f9449ad4e7bb8cb1308c internalID: -8440637772529549480 vertices: [] indices: @@ -870,14 +870,14 @@ TextureImporter: y: 330 width: 74 height: 165 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: f4932b086ffed974f98180a01dfc67d0 + spriteID: 37b72754d24284049bd37475c1dc1c73 internalID: -8014273901120947413 vertices: [] indices: @@ -891,14 +891,14 @@ TextureImporter: y: 330 width: 74 height: 165 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 9b6a66164fcd29447b207df3657ec43f + spriteID: 300989e9b2e594340aa536e7eb99a122 internalID: -4000570578673203884 vertices: [] indices: @@ -912,14 +912,14 @@ TextureImporter: y: 330 width: 74 height: 165 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 778e845119e8f4f49833660eccd834d0 + spriteID: 20a8e6d38abc33b44ae2837684ee4378 internalID: 1004047234507755550 vertices: [] indices: @@ -933,14 +933,14 @@ TextureImporter: y: 330 width: 74 height: 165 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 03714e8b5590b5b408057b4383766aa9 + spriteID: 55812be2f6d5b254781eabf8c964e03c internalID: 4131559682997794719 vertices: [] indices: @@ -954,14 +954,14 @@ TextureImporter: y: 330 width: 74 height: 165 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 578370f1155783e43b042a0ebd59153d + spriteID: 85381a7404756c044b74971f73ff7b36 internalID: -511967548365309145 vertices: [] indices: @@ -975,14 +975,14 @@ TextureImporter: y: 165 width: 74 height: 165 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 3cc8077279522fa48abb38ba9ab6630e + spriteID: cd24be8ac45b31742942972c394646b6 internalID: -4085349918552019405 vertices: [] indices: @@ -996,14 +996,14 @@ TextureImporter: y: 165 width: 74 height: 165 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 1476c869bb5cceb418eb6eaf9f026bbe + spriteID: 1989e1eb95780774981869472b3ac039 internalID: -4187153836280767531 vertices: [] indices: @@ -1017,14 +1017,14 @@ TextureImporter: y: 165 width: 74 height: 165 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: af846e1615f044d48b7ec070c81c49e4 + spriteID: 8c9d1b479d31d1043b2043524ac1cdf5 internalID: 84067300384673614 vertices: [] indices: @@ -1038,14 +1038,14 @@ TextureImporter: y: 165 width: 74 height: 165 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 75c1dce33d50ca94a8cedfbca8beb5d4 + spriteID: f5d0fd71d2d982840b9d7ff2a39f8ea1 internalID: 3851190421204911852 vertices: [] indices: @@ -1059,14 +1059,14 @@ TextureImporter: y: 165 width: 74 height: 165 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 030e92f5db4368f47a4d70b62edbdf62 + spriteID: 7e527359da094664cb6e96be192c151e internalID: 4284720074222180575 vertices: [] indices: @@ -1080,14 +1080,14 @@ TextureImporter: y: 165 width: 74 height: 165 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 8c50c8972d4de964d95cd80e0d7fccf7 + spriteID: 5b155e17d86fbdd4ebfc5dc06b3afe1d internalID: -4530764937145254445 vertices: [] indices: @@ -1101,14 +1101,14 @@ TextureImporter: y: 165 width: 74 height: 165 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 50bc5c77113d63b44a2208eb1dc16e78 + spriteID: 9428d68d031467a4fa3a4ccb8321f383 internalID: 6653156621327153891 vertices: [] indices: @@ -1122,14 +1122,14 @@ TextureImporter: y: 165 width: 74 height: 165 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: b5c166412e7044647965d42bb596702f + spriteID: 1ca64c0e704598e4eb2e7599687ce857 internalID: 4798127761176832974 vertices: [] indices: @@ -1143,14 +1143,14 @@ TextureImporter: y: 165 width: 74 height: 165 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 4d8dc055f4e72944c82f15c51506545d + spriteID: cd5061f3f82f3fa47bb4013ba9aaf43f internalID: -7614357209676450577 vertices: [] indices: @@ -1164,14 +1164,14 @@ TextureImporter: y: 165 width: 74 height: 165 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: a146eadfdf938ad4fa991b74146d6104 + spriteID: 28e2db2cbe754d8429446d2404539134 internalID: -2784094118811778264 vertices: [] indices: @@ -1185,14 +1185,14 @@ TextureImporter: y: 165 width: 74 height: 165 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 72759b9aa631d4b429b7aea41418f024 + spriteID: 5f2a69053f40eb44cbef2c9eaff44c4f internalID: -4137648012010955073 vertices: [] indices: @@ -1206,14 +1206,14 @@ TextureImporter: y: 165 width: 74 height: 165 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 7c94d61122ebd26409bf0844eed98aa0 + spriteID: 6d9419c0580f8844b8edeb4facd999ee internalID: 5127635330829457860 vertices: [] indices: @@ -1227,14 +1227,14 @@ TextureImporter: y: 165 width: 74 height: 165 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 335ae41de49f43f4daae6dc959de5772 + spriteID: 794181243cfb01d4f8ac616ae8855762 internalID: -6030294468896167171 vertices: [] indices: @@ -1248,14 +1248,14 @@ TextureImporter: y: 0 width: 74 height: 165 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 14e55f6279ad61e4ca6ea8a4ac15e6d4 + spriteID: 5deea67456a5a9149a0267f5afaa0168 internalID: 4295548763093784344 vertices: [] indices: @@ -1269,14 +1269,14 @@ TextureImporter: y: 0 width: 74 height: 165 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: baf7ed1561020ff4c92fa70da9185a3f + spriteID: cab0538b5e594f047a1c9a0118f4d335 internalID: 8912573597310164963 vertices: [] indices: @@ -1290,14 +1290,14 @@ TextureImporter: y: 0 width: 74 height: 165 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: c8becb95130f7cf43a93b486d8bf3fb6 + spriteID: f628541ca54316e428884f1907a3d83a internalID: 1246085161373625770 vertices: [] indices: @@ -1311,14 +1311,14 @@ TextureImporter: y: 0 width: 74 height: 165 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: fe177e05f68c47f48b43250a80750fbb + spriteID: 574d3fe17bbd33e47b4e44789b8aaa02 internalID: -1100987400158940940 vertices: [] indices: @@ -1332,14 +1332,14 @@ TextureImporter: y: 0 width: 74 height: 165 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: a6a6416d80f66164092de7bebe7894ae + spriteID: 5aa2602926604be4d8ac0a9b49da7aad internalID: -1974943860856553002 vertices: [] indices: @@ -1353,14 +1353,14 @@ TextureImporter: y: 0 width: 74 height: 165 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 9e7653064b98e7d478f763e40eacce34 + spriteID: 1c122040e8f1165458f603ac253410dd internalID: 6773436916727630701 vertices: [] indices: @@ -1374,14 +1374,14 @@ TextureImporter: y: 0 width: 74 height: 165 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: b1169604b5f72d94db6752695ca8cb72 + spriteID: a79d3fb2153d8944eaf1fd1374814674 internalID: -64604795105994581 vertices: [] indices: @@ -1395,14 +1395,14 @@ TextureImporter: y: 0 width: 74 height: 165 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: a1eec007adf362d4a85752ca5b45d0ba + spriteID: 4615061d6c24be34396e282f432fd2a9 internalID: -1675146083204219182 vertices: [] indices: @@ -1416,14 +1416,14 @@ TextureImporter: y: 0 width: 74 height: 165 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: e984830e4a69ddb40a6a591ca0f46ee5 + spriteID: 41748471374baab42b36d3d19336b3e7 internalID: -3983713289971908648 vertices: [] indices: @@ -1437,14 +1437,14 @@ TextureImporter: y: 0 width: 74 height: 165 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 383145b9a98d5104e8c3f2614b46a293 + spriteID: be9e6ce15d70fef4e94210fafdb0a224 internalID: 8955477272628416469 vertices: [] indices: @@ -1458,14 +1458,14 @@ TextureImporter: y: 0 width: 74 height: 165 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 0c56936adbfcc1a49b45a6f93517a01f + spriteID: 988c5e0ebb9cd1e488f6e7571061c0e1 internalID: -7799979545741386773 vertices: [] indices: @@ -1479,14 +1479,14 @@ TextureImporter: y: 0 width: 74 height: 165 - alignment: 0 - pivot: {x: 0.5, y: 0.5} + alignment: 7 + pivot: {x: 0.5, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] tessellationDetail: 0 bones: [] - spriteID: 0b3d83b7930e2cb41be9da1996448919 + spriteID: 7dc7787704b055643853c750c88d230a internalID: 8563789370804809115 vertices: [] indices: diff --git a/Assets/RawResources/动画测试/调酒妹对话.controller b/Assets/RawResources/动画测试/调酒妹测试.controller similarity index 96% rename from Assets/RawResources/动画测试/调酒妹对话.controller rename to Assets/RawResources/动画测试/调酒妹测试.controller index 3ce03555f..bb0b2b056 100644 --- a/Assets/RawResources/动画测试/调酒妹对话.controller +++ b/Assets/RawResources/动画测试/调酒妹测试.controller @@ -37,7 +37,10 @@ AnimatorStateTransition: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: - m_Conditions: [] + m_Conditions: + - m_ConditionMode: 1 + m_ConditionEvent: "\u7AD9\u7ACB" + m_EventTreshold: 0 m_DstStateMachine: {fileID: 0} m_DstState: {fileID: 2000764964157969243} m_Solo: 0 @@ -160,7 +163,7 @@ BlendTree: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_Name: "\u8868\u60C5\u6811" + m_Name: "\u7AD9\u7ACB" m_Childs: - serializedVersion: 2 m_Motion: {fileID: 7400000, guid: b8c35e4377bdc384fb7b02d0a0a5adb0, type: 2} @@ -171,7 +174,7 @@ BlendTree: m_DirectBlendParameter: Face Param m_Mirror: 0 - serializedVersion: 2 - m_Motion: {fileID: 7400000, guid: db7bf56502a3f7248b84a928932c6dba, type: 2} + m_Motion: {fileID: 7400000, guid: dcecc5122ee0a6e4bb2cb6f7150e0352, type: 2} m_Threshold: 0.14285715 m_Position: {x: 0, y: 0} m_TimeScale: 1 @@ -179,7 +182,7 @@ BlendTree: m_DirectBlendParameter: Face Param m_Mirror: 0 - serializedVersion: 2 - m_Motion: {fileID: 7400000, guid: 1fc4939a5bafe03458f51a6b3415f887, type: 2} + m_Motion: {fileID: 7400000, guid: fceb42b5e7ed7c946821aa0dd70a4ee9, type: 2} m_Threshold: 0.2857143 m_Position: {x: 0, y: 0} m_TimeScale: 1 @@ -187,7 +190,7 @@ BlendTree: m_DirectBlendParameter: Face Param m_Mirror: 0 - serializedVersion: 2 - m_Motion: {fileID: 7400000, guid: 4cf528f3862e4f648b6e048fd1963bff, type: 2} + m_Motion: {fileID: 7400000, guid: db7bf56502a3f7248b84a928932c6dba, type: 2} m_Threshold: 0.42857143 m_Position: {x: 0, y: 0} m_TimeScale: 1 @@ -195,7 +198,7 @@ BlendTree: m_DirectBlendParameter: Face Param m_Mirror: 0 - serializedVersion: 2 - m_Motion: {fileID: 7400000, guid: 4d76bf91864f7a242b336bba4f9d56eb, type: 2} + m_Motion: {fileID: 7400000, guid: d86cc0526c869a44dbee96982575225a, type: 2} m_Threshold: 0.5714286 m_Position: {x: 0, y: 0} m_TimeScale: 1 @@ -203,7 +206,7 @@ BlendTree: m_DirectBlendParameter: Face Param m_Mirror: 0 - serializedVersion: 2 - m_Motion: {fileID: 7400000, guid: d86cc0526c869a44dbee96982575225a, type: 2} + m_Motion: {fileID: 7400000, guid: 4d76bf91864f7a242b336bba4f9d56eb, type: 2} m_Threshold: 0.71428573 m_Position: {x: 0, y: 0} m_TimeScale: 1 @@ -211,7 +214,7 @@ BlendTree: m_DirectBlendParameter: Face Param m_Mirror: 0 - serializedVersion: 2 - m_Motion: {fileID: 7400000, guid: fceb42b5e7ed7c946821aa0dd70a4ee9, type: 2} + m_Motion: {fileID: 7400000, guid: 1fc4939a5bafe03458f51a6b3415f887, type: 2} m_Threshold: 0.85714287 m_Position: {x: 0, y: 0} m_TimeScale: 1 @@ -219,7 +222,7 @@ BlendTree: m_DirectBlendParameter: Face Param m_Mirror: 0 - serializedVersion: 2 - m_Motion: {fileID: 7400000, guid: dcecc5122ee0a6e4bb2cb6f7150e0352, type: 2} + m_Motion: {fileID: 7400000, guid: 4cf528f3862e4f648b6e048fd1963bff, type: 2} m_Threshold: 1 m_Position: {x: 0, y: 0} m_TimeScale: 1 @@ -270,7 +273,7 @@ BlendTree: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_Name: "\u8868\u60C5\u6811" + m_Name: "\u4FEF\u8EAB\u5D4C\u5957" m_Childs: - serializedVersion: 2 m_Motion: {fileID: -2744929173030523074} @@ -405,7 +408,7 @@ BlendTree: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_Name: Blend Tree + m_Name: "\u4FEF\u8EAB" m_Childs: - serializedVersion: 2 m_Motion: {fileID: 7400000, guid: e5130ddb48a132144b6c1bf9c9c961e7, type: 2} @@ -418,7 +421,7 @@ BlendTree: - serializedVersion: 2 m_Motion: {fileID: 7400000, guid: c036bcf4be7bfd64a995ba1540897bd3, type: 2} m_Threshold: 0.11111111 - m_Position: {x: 0, y: 0.25} + m_Position: {x: 0.25, y: 0} m_TimeScale: 1 m_CycleOffset: 0 m_DirectBlendParameter: Face Param @@ -426,7 +429,7 @@ BlendTree: - serializedVersion: 2 m_Motion: {fileID: 7400000, guid: 6831b0ed0ab32204d93a4cfeafc4d729, type: 2} m_Threshold: 0.22222222 - m_Position: {x: 0, y: 0.5} + m_Position: {x: 0.5, y: 0} m_TimeScale: 1 m_CycleOffset: 0 m_DirectBlendParameter: Face Param @@ -434,7 +437,7 @@ BlendTree: - serializedVersion: 2 m_Motion: {fileID: 7400000, guid: 2dbc7b4d80fa44b4d950d2d72b8ccd38, type: 2} m_Threshold: 0.33333334 - m_Position: {x: 0, y: 0.75} + m_Position: {x: 0.75, y: 0} m_TimeScale: 1 m_CycleOffset: 0 m_DirectBlendParameter: Face Param @@ -442,23 +445,23 @@ BlendTree: - serializedVersion: 2 m_Motion: {fileID: 7400000, guid: d514e4ea2fcb95f45a2af2824157747e, type: 2} m_Threshold: 0.44444445 - m_Position: {x: 0, y: 1} - m_TimeScale: 1 - m_CycleOffset: 0 - m_DirectBlendParameter: Face Param - m_Mirror: 0 - - serializedVersion: 2 - m_Motion: {fileID: 7400000, guid: ef4481488ee69be4fb09e06d528a01e4, type: 2} - m_Threshold: 0.5555556 m_Position: {x: 1, y: 0} m_TimeScale: 1 m_CycleOffset: 0 m_DirectBlendParameter: Face Param m_Mirror: 0 + - serializedVersion: 2 + m_Motion: {fileID: 7400000, guid: ef4481488ee69be4fb09e06d528a01e4, type: 2} + m_Threshold: 0.5555556 + m_Position: {x: 0, y: 1} + m_TimeScale: 1 + m_CycleOffset: 0 + m_DirectBlendParameter: Face Param + m_Mirror: 0 - serializedVersion: 2 m_Motion: {fileID: 7400000, guid: ef4481488ee69be4fb09e06d528a01e4, type: 2} m_Threshold: 0.6666667 - m_Position: {x: 1, y: 0.25} + m_Position: {x: 0.25, y: 1} m_TimeScale: 1 m_CycleOffset: 0 m_DirectBlendParameter: Face Param @@ -466,7 +469,7 @@ BlendTree: - serializedVersion: 2 m_Motion: {fileID: 7400000, guid: ee6edc6a9d530e942b89e5f1f01a7838, type: 2} m_Threshold: 0.7777778 - m_Position: {x: 1, y: 0.5} + m_Position: {x: 0.5, y: 1} m_TimeScale: 1 m_CycleOffset: 0 m_DirectBlendParameter: Face Param @@ -474,7 +477,7 @@ BlendTree: - serializedVersion: 2 m_Motion: {fileID: 7400000, guid: 31ef1ad1572c0e14f837712609fdca90, type: 2} m_Threshold: 0.8888889 - m_Position: {x: 1, y: 0.75} + m_Position: {x: 0.75, y: 1} m_TimeScale: 1 m_CycleOffset: 0 m_DirectBlendParameter: Face Param @@ -546,7 +549,7 @@ AnimatorController: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_Name: "\u8C03\u9152\u59B9\u5BF9\u8BDD" + m_Name: "\u8C03\u9152\u59B9\u6D4B\u8BD5" serializedVersion: 5 m_AnimatorParameters: - m_Name: Face Param @@ -554,13 +557,25 @@ AnimatorController: m_DefaultFloat: 0 m_DefaultInt: 0 m_DefaultBool: 0 - m_Controller: {fileID: 0} + m_Controller: {fileID: 9100000} - m_Name: Is Talking m_Type: 1 m_DefaultFloat: 0 m_DefaultInt: 0 m_DefaultBool: 0 - m_Controller: {fileID: 0} + m_Controller: {fileID: 9100000} + - m_Name: "\u7AD9\u7ACB" + m_Type: 9 + m_DefaultFloat: 0 + m_DefaultInt: 0 + m_DefaultBool: 0 + m_Controller: {fileID: 9100000} + - m_Name: "\u4FEF\u8EAB" + m_Type: 9 + m_DefaultFloat: 0 + m_DefaultInt: 0 + m_DefaultBool: 0 + m_Controller: {fileID: 9100000} m_AnimatorLayers: - serializedVersion: 5 m_Name: Base Layer @@ -765,7 +780,7 @@ AnimatorStateMachine: m_Position: {x: 400, y: 140, z: 0} - serializedVersion: 1 m_State: {fileID: 4025084367579902075} - m_Position: {x: 400, y: 600, z: 0} + m_Position: {x: 400, y: 580, z: 0} - serializedVersion: 1 m_State: {fileID: 7455082539712181259} m_Position: {x: 400, y: 330, z: 0} @@ -774,7 +789,7 @@ AnimatorStateMachine: m_Position: {x: 400, y: 380, z: 0} - serializedVersion: 1 m_State: {fileID: -4513199141124557387} - m_Position: {x: 1094.9006, y: 485.20624, z: 0} + m_Position: {x: 800, y: 580, z: 0} m_ChildStateMachines: [] m_AnyStateTransitions: [] m_EntryTransitions: [] @@ -782,7 +797,7 @@ AnimatorStateMachine: m_StateMachineBehaviours: [] m_AnyStatePosition: {x: 50, y: 20, z: 0} m_EntryPosition: {x: 50, y: 120, z: 0} - m_ExitPosition: {x: 840, y: 110, z: 0} + m_ExitPosition: {x: 1340, y: 150, z: 0} m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} m_DefaultState: {fileID: -1585003012359330868} --- !u!206 &7353513526415861616 @@ -834,7 +849,10 @@ AnimatorStateTransition: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: - m_Conditions: [] + m_Conditions: + - m_ConditionMode: 1 + m_ConditionEvent: "\u4FEF\u8EAB" + m_EventTreshold: 0 m_DstStateMachine: {fileID: 0} m_DstState: {fileID: 7455082539712181259} m_Solo: 0 diff --git a/Assets/RawResources/动画测试/调酒妹对话.controller.meta b/Assets/RawResources/动画测试/调酒妹测试.controller.meta similarity index 100% rename from Assets/RawResources/动画测试/调酒妹对话.controller.meta rename to Assets/RawResources/动画测试/调酒妹测试.controller.meta diff --git a/Assets/RawResources/动画测试/调酒妹测试.json b/Assets/RawResources/动画测试/调酒妹测试.json new file mode 100644 index 000000000..e439d572f --- /dev/null +++ b/Assets/RawResources/动画测试/调酒妹测试.json @@ -0,0 +1,462 @@ +[ + { + "name": "站立", + "type": "1D", + "clipCount": 8, + "clips": [ + { + "clipName": "IDLE", + "position": { + "x": 0.0, + "y": 0.0, + "magnitude": 0.0, + "sqrMagnitude": 0.0 + }, + "threshold": 0.0 + }, + { + "clipName": "1 伤心聆听", + "position": { + "x": 0.0, + "y": 0.0, + "magnitude": 0.0, + "sqrMagnitude": 0.0 + }, + "threshold": 0.142857149 + }, + { + "clipName": "1 强颜欢笑", + "position": { + "x": 0.0, + "y": 0.0, + "magnitude": 0.0, + "sqrMagnitude": 0.0 + }, + "threshold": 0.2857143 + }, + { + "clipName": "1 眯眼笑", + "position": { + "x": 0.0, + "y": 0.0, + "magnitude": 0.0, + "sqrMagnitude": 0.0 + }, + "threshold": 0.428571433 + }, + { + "clipName": "1 聆听", + "position": { + "x": 0.0, + "y": 0.0, + "magnitude": 0.0, + "sqrMagnitude": 0.0 + }, + "threshold": 0.5714286 + }, + { + "clipName": "1 苦笑", + "position": { + "x": 0.0, + "y": 0.0, + "magnitude": 0.0, + "sqrMagnitude": 0.0 + }, + "threshold": 0.714285731 + }, + { + "clipName": "1 闭眼笑", + "position": { + "x": 0.0, + "y": 0.0, + "magnitude": 0.0, + "sqrMagnitude": 0.0 + }, + "threshold": 0.857142866 + }, + { + "clipName": "1 难过", + "position": { + "x": 0.0, + "y": 0.0, + "magnitude": 0.0, + "sqrMagnitude": 0.0 + }, + "threshold": 1.0 + } + ], + "minThreshold": 0.0, + "maxThreshold": 1.0, + "blendParameter": "Face Param", + "blendParameterY": "Blend" + }, + { + "name": "俯身", + "type": "2D", + "clipCount": 0, + "clips": [ + { + "clipName": "2 俯身A", + "position": { + "x": 0.0, + "y": 0.0, + "magnitude": 0.0, + "sqrMagnitude": 0.0 + }, + "threshold": 0.0 + }, + { + "clipName": "2 俯身B", + "position": { + "x": 0.25, + "y": 0.0, + "normalized": { + "x": 1.0, + "y": 0.0, + "magnitude": 1.0, + "sqrMagnitude": 1.0 + }, + "magnitude": 0.25, + "sqrMagnitude": 0.0625 + }, + "threshold": 0.0 + }, + { + "clipName": "2 微笑", + "position": { + "x": 0.5, + "y": 0.0, + "normalized": { + "x": 1.0, + "y": 0.0, + "magnitude": 1.0, + "sqrMagnitude": 1.0 + }, + "magnitude": 0.5, + "sqrMagnitude": 0.25 + }, + "threshold": 0.0 + }, + { + "clipName": "2 眯眼A", + "position": { + "x": 0.75, + "y": 0.0, + "normalized": { + "x": 1.0, + "y": 0.0, + "magnitude": 1.0, + "sqrMagnitude": 1.0 + }, + "magnitude": 0.75, + "sqrMagnitude": 0.5625 + }, + "threshold": 0.0 + }, + { + "clipName": "2 眯眼B", + "position": { + "x": 1.0, + "y": 0.0, + "magnitude": 1.0, + "sqrMagnitude": 1.0 + }, + "threshold": 0.0 + }, + { + "clipName": "2 俯身谈话", + "position": { + "x": 0.0, + "y": 1.0, + "magnitude": 1.0, + "sqrMagnitude": 1.0 + }, + "threshold": 0.0 + }, + { + "clipName": "2 俯身谈话", + "position": { + "x": 0.25, + "y": 1.0, + "normalized": { + "x": 0.242535636, + "y": 0.970142543, + "magnitude": 1.0, + "sqrMagnitude": 1.00000012 + }, + "magnitude": 1.03077638, + "sqrMagnitude": 1.0625 + }, + "threshold": 0.0 + }, + { + "clipName": "2 微笑对话", + "position": { + "x": 0.5, + "y": 1.0, + "normalized": { + "x": 0.4472136, + "y": 0.8944272, + "magnitude": 1.0, + "sqrMagnitude": 1.0 + }, + "magnitude": 1.118034, + "sqrMagnitude": 1.25 + }, + "threshold": 0.0 + }, + { + "clipName": "2 眯眼对话", + "position": { + "x": 0.75, + "y": 1.0, + "normalized": { + "x": 0.6, + "y": 0.8, + "magnitude": 1.0, + "sqrMagnitude": 1.0 + }, + "magnitude": 1.25, + "sqrMagnitude": 1.5625 + }, + "threshold": 0.0 + }, + { + "clipName": "2 眯眼对话", + "position": { + "x": 1.0, + "y": 1.0, + "normalized": { + "x": 0.707106769, + "y": 0.707106769, + "magnitude": 1.0, + "sqrMagnitude": 0.99999994 + }, + "magnitude": 1.41421354, + "sqrMagnitude": 2.0 + }, + "threshold": 0.0 + } + ], + "minThreshold": 0.0, + "maxThreshold": 1.0, + "blendParameter": "Face Param", + "blendParameterY": "Is Talking" + }, + { + "name": "俯身A", + "type": "1D", + "clipCount": 2, + "clips": [ + { + "clipName": "2 俯身A", + "position": { + "x": 0.0, + "y": 0.0, + "magnitude": 0.0, + "sqrMagnitude": 0.0 + }, + "threshold": 0.0 + }, + { + "clipName": "2 俯身谈话", + "position": { + "x": 0.0, + "y": 0.0, + "magnitude": 0.0, + "sqrMagnitude": 0.0 + }, + "threshold": 1.0 + } + ], + "minThreshold": 0.0, + "maxThreshold": 1.0, + "blendParameter": "Is Talking", + "blendParameterY": "Blend" + }, + { + "name": "俯身B", + "type": "1D", + "clipCount": 2, + "clips": [ + { + "clipName": "2 俯身B", + "position": { + "x": 0.0, + "y": 0.0, + "magnitude": 0.0, + "sqrMagnitude": 0.0 + }, + "threshold": 0.0 + }, + { + "clipName": "2 俯身谈话", + "position": { + "x": 0.0, + "y": 0.0, + "magnitude": 0.0, + "sqrMagnitude": 0.0 + }, + "threshold": 1.0 + } + ], + "minThreshold": 0.0, + "maxThreshold": 1.0, + "blendParameter": "Is Talking", + "blendParameterY": "Blend" + }, + { + "name": "微笑", + "type": "1D", + "clipCount": 2, + "clips": [ + { + "clipName": "2 微笑", + "position": { + "x": 0.0, + "y": 0.0, + "magnitude": 0.0, + "sqrMagnitude": 0.0 + }, + "threshold": 0.0 + }, + { + "clipName": "2 微笑对话", + "position": { + "x": 0.0, + "y": 0.0, + "magnitude": 0.0, + "sqrMagnitude": 0.0 + }, + "threshold": 1.0 + } + ], + "minThreshold": 0.0, + "maxThreshold": 1.0, + "blendParameter": "Is Talking", + "blendParameterY": "Blend" + }, + { + "name": "眯眼A", + "type": "1D", + "clipCount": 2, + "clips": [ + { + "clipName": "2 眯眼A", + "position": { + "x": 0.0, + "y": 0.0, + "magnitude": 0.0, + "sqrMagnitude": 0.0 + }, + "threshold": 0.0 + }, + { + "clipName": "2 眯眼对话", + "position": { + "x": 0.0, + "y": 0.0, + "magnitude": 0.0, + "sqrMagnitude": 0.0 + }, + "threshold": 1.0 + } + ], + "minThreshold": 0.0, + "maxThreshold": 1.0, + "blendParameter": "Is Talking", + "blendParameterY": "Blend" + }, + { + "name": "眯眼B", + "type": "1D", + "clipCount": 2, + "clips": [ + { + "clipName": "2 眯眼B", + "position": { + "x": 0.0, + "y": 0.0, + "magnitude": 0.0, + "sqrMagnitude": 0.0 + }, + "threshold": 0.0 + }, + { + "clipName": "2 眯眼对话", + "position": { + "x": 0.0, + "y": 0.0, + "magnitude": 0.0, + "sqrMagnitude": 0.0 + }, + "threshold": 1.0 + } + ], + "minThreshold": 0.0, + "maxThreshold": 1.0, + "blendParameter": "Is Talking", + "blendParameterY": "Blend" + }, + { + "name": "俯身嵌套", + "type": "1D", + "clipCount": 5, + "clips": [ + { + "clipName": "俯身A", + "position": { + "x": 0.0, + "y": 0.0, + "magnitude": 0.0, + "sqrMagnitude": 0.0 + }, + "threshold": 0.0 + }, + { + "clipName": "俯身B", + "position": { + "x": 0.0, + "y": 0.0, + "magnitude": 0.0, + "sqrMagnitude": 0.0 + }, + "threshold": 0.25 + }, + { + "clipName": "微笑", + "position": { + "x": 0.0, + "y": 0.0, + "magnitude": 0.0, + "sqrMagnitude": 0.0 + }, + "threshold": 0.5 + }, + { + "clipName": "眯眼A", + "position": { + "x": 0.0, + "y": 0.0, + "magnitude": 0.0, + "sqrMagnitude": 0.0 + }, + "threshold": 0.75 + }, + { + "clipName": "眯眼B", + "position": { + "x": 0.0, + "y": 0.0, + "magnitude": 0.0, + "sqrMagnitude": 0.0 + }, + "threshold": 1.0 + } + ], + "minThreshold": 0.0, + "maxThreshold": 1.0, + "blendParameter": "Face Param", + "blendParameterY": "Is Talking" + } +] \ No newline at end of file diff --git a/Assets/AddressableAssetsData/link.xml.meta b/Assets/RawResources/动画测试/调酒妹测试.json.meta similarity index 75% rename from Assets/AddressableAssetsData/link.xml.meta rename to Assets/RawResources/动画测试/调酒妹测试.json.meta index aeeb56e30..7427d009d 100644 --- a/Assets/AddressableAssetsData/link.xml.meta +++ b/Assets/RawResources/动画测试/调酒妹测试.json.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 584f40cda73fae84ca1b41fb44dd0e6a +guid: 7985fcc6bb83afa43b21d52f4c463f81 TextScriptImporter: externalObjects: {} userData: diff --git a/Assets/Scenes/动画测试.unity b/Assets/Scenes/动画测试.unity index 3ca4d13a4..4ef8828f2 100644 --- a/Assets/Scenes/动画测试.unity +++ b/Assets/Scenes/动画测试.unity @@ -123,7 +123,7 @@ NavMeshSettings: debug: m_Flags: 0 m_NavMeshData: {fileID: 0} ---- !u!1 &141893929 +--- !u!1 &264892729 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -131,23 +131,53 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 141893930} - - component: {fileID: 141893932} - - component: {fileID: 141893931} + - component: {fileID: 264892730} m_Layer: 0 - m_Name: Square + m_Name: Slots m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!4 &141893930 +--- !u!4 &264892730 Transform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 141893929} + m_GameObject: {fileID: 264892729} + serializedVersion: 2 + 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: 1693830861} + m_Father: {fileID: 1618964975} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &319206166 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 319206167} + m_Layer: 0 + m_Name: ActorRoot + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &319206167 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 319206166} serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} @@ -156,79 +186,6 @@ Transform: m_Children: [] m_Father: {fileID: 1618964975} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!95 &141893931 -Animator: - serializedVersion: 5 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 141893929} - m_Enabled: 1 - m_Avatar: {fileID: 0} - m_Controller: {fileID: 9100000, guid: ebbbb3564a7b6ef479927d786c7f771d, 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!212 &141893932 -SpriteRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 141893929} - m_Enabled: 1 - m_CastShadows: 0 - m_ReceiveShadows: 0 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 0 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 0 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_Sprite: {fileID: 7482667652216324306, guid: 311925a002f4447b3a28927169b83ea6, type: 3} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_FlipX: 0 - m_FlipY: 0 - m_DrawMode: 0 - m_Size: {x: 1, y: 1} - m_AdaptiveModeThreshold: 0.5 - m_SpriteTileMode: 0 - m_WasSpriteAssigned: 1 - m_MaskInteraction: 0 - m_SpriteSortPoint: 0 --- !u!1 &1618964974 GameObject: m_ObjectHideFlags: 0 @@ -238,6 +195,8 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 1618964975} + - component: {fileID: 1618964976} + - component: {fileID: 1618964977} m_Layer: 0 m_Name: GameObject m_TagString: Untagged @@ -258,9 +217,87 @@ Transform: m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: - - {fileID: 141893930} + - {fileID: 264892730} + - {fileID: 319206167} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1618964976 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1618964974} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3700d4c1c99441a7979e423de3700aad, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &1618964977 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1618964974} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ad8285f6dc2406249bd2c4be2571999d, type: 3} + m_Name: + m_EditorClassIdentifier: + testActorName: "\u8C03\u9152\u59B9\u6D4B\u8BD5" + testSlotName: "\u6D4B\u8BD5" + showHelp: 1 +--- !u!1 &1693830860 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1693830861} + - component: {fileID: 1693830862} + m_Layer: 0 + m_Name: "\u5427\u53F0\u5DE6\u4FA7" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1693830861 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1693830860} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -1.7441864, y: -5, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 264892730} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1693830862 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1693830860} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1988b7c536404a3d89fd441651bd40ea, type: 3} + m_Name: + m_EditorClassIdentifier: + slotName: "\u6D4B\u8BD5" + sortingLayer: 0 + sortingOrder: 11 + hasDefaultActor: 0 + defaultActorType: 0 + defaultActorName: --- !u!1 &1704186012 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/FixSystemNew/Screen System/ScreenSystem.cs b/Assets/Scripts/FixSystemNew/Screen System/ScreenSystem.cs index fd19131d7..e56ef4147 100644 --- a/Assets/Scripts/FixSystemNew/Screen System/ScreenSystem.cs +++ b/Assets/Scripts/FixSystemNew/Screen System/ScreenSystem.cs @@ -49,6 +49,7 @@ namespace AibisDream.FixSystem FixSystemCenter.SystemDic.Register(this); DialogUIManager.Instance.RegisterScreenView(DialogViewType.Screen, this); DialogUIManager.Instance.RegisterScreenView(DialogViewType.Task, TaskScreen); + // StorageSystem.Instance.RegisterData(this); } private void OnDestroy() diff --git a/Assets/Scripts/Framework/OtherKit/AnimatorKit.cs b/Assets/Scripts/Framework/OtherKit/AnimatorKit.cs new file mode 100644 index 000000000..53c9c19cc --- /dev/null +++ b/Assets/Scripts/Framework/OtherKit/AnimatorKit.cs @@ -0,0 +1,275 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using Newtonsoft.Json; +using UnityEngine; +#if UNITY_EDITOR +using UnityEditor.Animations; +#endif + +namespace AibisDream.Framework +{ + public static class AnimatorKit + { + +#if UNITY_EDITOR + /// + /// 解析 AnimatorController 下的所有混合树 + /// + /// AnimatorController 资产 + /// 混合树信息列表 + public static List ParseBlendTree(AnimatorController controller) + { + if (controller == null) + { + Debug.LogWarning("AnimatorController 为空"); + return new List(); + } + + var blendTreeInfos = new List(); + + // 遍历所有层 + foreach (var layer in controller.layers) + { + if (layer.stateMachine != null) + { + CollectBlendTreesFromStateMachine(layer.stateMachine, blendTreeInfos); + } + } + + return blendTreeInfos; + } + + /// + /// 从状态机中收集混合树(递归处理子状态机) + /// + private static void CollectBlendTreesFromStateMachine(AnimatorStateMachine stateMachine, List blendTreeInfos) + { + if (stateMachine == null) return; + + // 遍历所有状态 + foreach (var state in stateMachine.states) + { + if (state.state?.motion is BlendTree blendTree) + { + CollectBlendTreeInfo(blendTree, blendTreeInfos); + } + } + + // 递归处理子状态机 + foreach (var subStateMachine in stateMachine.stateMachines) + { + if (subStateMachine.stateMachine != null) + { + CollectBlendTreesFromStateMachine(subStateMachine.stateMachine, blendTreeInfos); + } + } + } + + /// + /// 收集混合树信息(递归处理子混合树) + /// + private static void CollectBlendTreeInfo(BlendTree blendTree, List blendTreeInfos) + { + if (blendTree == null) return; + + var info = new BlendTreeInfo + { + name = blendTree.name, + minThreshold = blendTree.minThreshold, + maxThreshold = blendTree.maxThreshold, + blendParameter = blendTree.blendParameter, + blendParameterY = blendTree.blendParameterY + }; + + // 判断混合树类型 + int blendType = (int)blendTree.blendType; + if (blendType == 0) // Simple1D + { + info.type = "1D"; + info.clips = new List(); + + if (blendTree.children != null) + { + foreach (var child in blendTree.children) + { + if (child.motion != null) + { + var clipInfo = new BlendTreeClipInfo + { + clipName = child.motion.name, + threshold = child.threshold + }; + info.clips.Add(clipInfo); + + // 如果子 Motion 也是 BlendTree,递归处理 + if (child.motion is BlendTree childBlendTree) + { + CollectBlendTreeInfo(childBlendTree, blendTreeInfos); + } + } + } + } + + info.clipCount = info.clips?.Count ?? 0; + } + else if (blendType >= 1 && blendType <= 3) // 2D 类型 + { + info.type = "2D"; + info.clips = new List(); + + if (blendTree.children != null) + { + foreach (var child in blendTree.children) + { + if (child.motion != null) + { + var clipInfo = new BlendTreeClipInfo + { + clipName = child.motion.name, + position = child.position + }; + info.clips.Add(clipInfo); + + // 如果子 Motion 也是 BlendTree,递归处理 + if (child.motion is BlendTree childBlendTree) + { + CollectBlendTreeInfo(childBlendTree, blendTreeInfos); + } + } + } + } + } + else // Direct 类型或其他 + { + info.type = "Direct"; + info.clipCount = blendTree.children?.Length ?? 0; + } + + blendTreeInfos.Add(info); + } +#endif + + /// + /// 从 JSON 字符串解析混合树信息列表 + /// + /// JSON 字符串 + /// 混合树信息列表 + public static List ParseBlendTreeFromJson(string jsonString) + { + if (string.IsNullOrEmpty(jsonString)) + { + Debug.LogWarning("JSON 字符串为空"); + return new List(); + } + + try + { + // 配置反序列化设置 + var settings = new JsonSerializerSettings + { + ReferenceLoopHandling = ReferenceLoopHandling.Ignore + }; + + // 反序列化 JSON + var blendTreeInfos = JsonConvert.DeserializeObject>(jsonString, settings); + + if (blendTreeInfos == null) + { + Debug.LogWarning("JSON 反序列化结果为 null"); + return new List(); + } + + return blendTreeInfos; + } + catch (Exception e) + { + Debug.LogError($"从 JSON 解析混合树信息失败: {e.Message}"); + return new List(); + } + } + + /// + /// 从 JSON 文件路径解析混合树信息列表 + /// + /// JSON 文件路径(可以是 Assets 相对路径或绝对路径) + /// 混合树信息列表 + public static List ParseBlendTreeFromJsonFile(string jsonFilePath) + { + if (string.IsNullOrEmpty(jsonFilePath)) + { + Debug.LogWarning("JSON 文件路径为空"); + return new List(); + } + + try + { + // 处理路径 + string fullPath = jsonFilePath; + if (!Path.IsPathRooted(jsonFilePath)) + { + // 如果是相对路径,尝试转换为绝对路径 + if (jsonFilePath.StartsWith("Assets/")) + { + fullPath = Path.Combine(Application.dataPath, jsonFilePath.Substring(7)); + } + else + { + fullPath = Path.Combine(Application.dataPath, jsonFilePath); + } + } + + // 检查文件是否存在 + if (!File.Exists(fullPath)) + { + Debug.LogWarning($"JSON 文件不存在: {fullPath}"); + return new List(); + } + + // 读取文件内容 + string jsonContent = File.ReadAllText(fullPath, System.Text.Encoding.UTF8); + + // 调用字符串解析方法 + return ParseBlendTreeFromJson(jsonContent); + } + catch (Exception e) + { + Debug.LogError($"从 JSON 文件解析混合树信息失败: {e.Message}"); + return new List(); + } + } + } + + /// + /// 混合树信息数据结构 + /// + [System.Serializable] + public class BlendTreeInfo + { + public string name; + public string type; // "1D" 或 "2D" + public int clipCount; // 1D 类型的动画片段数量 + public List clips; // 2D 类型的动画片段列表 + public float minThreshold; + public float maxThreshold; + public string blendParameter; + public string blendParameterY; // 2D 类型使用 + + public BlendTreeClipInfo GetClipInfo(string clipName) + { + return clips.FirstOrDefault(clip => clip.clipName == clipName); + } + } + + /// + /// 混合树动画片段信息(用于 1D 和 2D 类型) + /// + [System.Serializable] + public class BlendTreeClipInfo + { + public string clipName; + public Vector2 position; // 2D 类型使用 + public float threshold; // 1D 类型使用 + } +} diff --git a/Assets/RawResources/动画测试/SpriteMergerTest.cs.meta b/Assets/Scripts/Framework/OtherKit/AnimatorKit.cs.meta similarity index 83% rename from Assets/RawResources/动画测试/SpriteMergerTest.cs.meta rename to Assets/Scripts/Framework/OtherKit/AnimatorKit.cs.meta index e6c3a0207..f5dddc49d 100644 --- a/Assets/RawResources/动画测试/SpriteMergerTest.cs.meta +++ b/Assets/Scripts/Framework/OtherKit/AnimatorKit.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: fe4e9dd5908a9d3458f0e5173a4afd4b +guid: e177393c41637844eab695631f6b3665 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/Scripts/Framework/Utility/SpriteMerger.cs b/Assets/Scripts/Framework/Utility/SpriteMerger.cs deleted file mode 100644 index e5f7f3d11..000000000 --- a/Assets/Scripts/Framework/Utility/SpriteMerger.cs +++ /dev/null @@ -1,733 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using UnityEngine; -using UnityEngine.Rendering; - -namespace AibisDream.Framework -{ - /// - /// 合并结果,包含合并后的Sprite和世界位置信息 - /// - public struct MergeResult - { - public Sprite sprite; - public Vector3 worldPosition; // 世界空间中心位置 - public Bounds worldBounds; // 世界空间包围盒 - } - - /// - /// SpriteRenderer合并工具类 - /// - public static class SpriteMerger - { - /// - /// 合并多个SpriteRenderer为一个Sprite - /// - /// 要合并的SpriteRenderer数组 - /// 输出纹理宽度(像素),0则自动计算 - /// 输出纹理高度(像素),0则自动计算 - /// Sprite的pixelsPerUnit - /// 合并结果,包含Sprite和世界位置信息 - public static MergeResult MergeSpriteRenderers( - SpriteRenderer[] renderers, - int textureWidth = 0, - int textureHeight = 0, - float pixelsPerUnit = 100f) - { - if (renderers == null || renderers.Length == 0) - { - Debug.LogError("SpriteRenderer数组为空"); - return new MergeResult(); - } - - // 过滤掉无效的renderer - var validRenderers = renderers.Where(r => r != null && r.sprite != null).ToArray(); - if (validRenderers.Length == 0) - { - Debug.LogError("没有有效的SpriteRenderer"); - return new MergeResult(); - } - - // 1. 计算世界空间包围盒 - Bounds worldBounds = CalculateWorldBounds(validRenderers); - - - - // 2. 确定纹理尺寸 - if (textureWidth <= 0 || textureHeight <= 0) - { - // 根据包围盒自动计算尺寸,保持宽高比 - float aspect = worldBounds.size.x / worldBounds.size.y; - if (aspect > 1f) - { - textureWidth = Mathf.NextPowerOfTwo(Mathf.CeilToInt(worldBounds.size.x * pixelsPerUnit)); - textureHeight = Mathf.NextPowerOfTwo(Mathf.CeilToInt(textureWidth / aspect)); - } - else - { - textureHeight = Mathf.NextPowerOfTwo(Mathf.CeilToInt(worldBounds.size.y * pixelsPerUnit)); - textureWidth = Mathf.NextPowerOfTwo(Mathf.CeilToInt(textureHeight * aspect)); - } - } - - // 3. 创建RenderTexture和临时Camera - RenderTexture renderTexture = null; - Camera tempCamera = null; - - try - { - renderTexture = CreateRenderTexture(textureWidth, textureHeight); - tempCamera = CreateTempCamera(worldBounds, renderTexture); - - // 4. 渲染SpriteRenderer到RenderTexture - RenderSpritesToTexture(validRenderers, tempCamera); - - // 5. 读取为Texture2D - Texture2D texture2D = ReadRenderTexture(renderTexture); - - // 6. 转换为Sprite - Sprite sprite = TextureToSprite(texture2D, pixelsPerUnit); - - // 7. 返回结果 - return new MergeResult - { - sprite = sprite, - worldPosition = worldBounds.center, - worldBounds = worldBounds - }; - } - finally - { - // 清理资源 - CleanupResources(tempCamera, renderTexture); - } - } - - /// - /// 计算世界空间包围盒 - /// - private static Bounds CalculateWorldBounds(SpriteRenderer[] renderers) - { - if (renderers.Length == 0) return new Bounds(); - - bool first = true; - Bounds bounds = new Bounds(); - - foreach (var renderer in renderers) - { - if (renderer.sprite == null) continue; - - // 获取Sprite的本地边界 - Bounds spriteBounds = renderer.sprite.bounds; - - // 获取世界位置(只考虑位置,不考虑旋转缩放) - Vector3 worldPos = renderer.transform.position; - - // 计算世界空间中的四个角点 - Vector3 center = worldPos + spriteBounds.center; - Vector3 size = spriteBounds.size; - - Vector3[] corners = new Vector3[] - { - center + new Vector3(-size.x / 2, -size.y / 2, 0), - center + new Vector3(size.x / 2, -size.y / 2, 0), - center + new Vector3(-size.x / 2, size.y / 2, 0), - center + new Vector3(size.x / 2, size.y / 2, 0) - }; - - if (first) - { - bounds = new Bounds(corners[0], Vector3.zero); - first = false; - } - - foreach (var corner in corners) - { - bounds.Encapsulate(corner); - } - } - - return bounds; - } - - /// - /// 创建RenderTexture - /// - private static RenderTexture CreateRenderTexture(int width, int height) - { - RenderTexture rt = new RenderTexture(width, height, 0, RenderTextureFormat.ARGB32); - rt.antiAliasing = 1; - rt.filterMode = FilterMode.Bilinear; - rt.anisoLevel = 0; - rt.Create(); - return rt; - } - - /// - /// 创建临时Camera - /// - private static Camera CreateTempCamera(Bounds worldBounds, RenderTexture targetTexture) - { - GameObject cameraObj = new GameObject("TempSpriteMergerCamera"); - Camera cam = cameraObj.AddComponent(); - - cam.orthographic = true; - cam.orthographicSize = worldBounds.size.y / 2f; - cam.nearClipPlane = 0.1f; - cam.farClipPlane = 1000f; - cam.clearFlags = CameraClearFlags.SolidColor; - cam.backgroundColor = new Color(0, 0, 0, 0); // 透明背景 - cam.cullingMask = 0; // 不渲染任何Layer,我们手动绘制 - cam.targetTexture = targetTexture; - - // 设置相机位置在包围盒中心,面向Z轴正方向 - cam.transform.position = new Vector3( - worldBounds.center.x, - worldBounds.center.y, - worldBounds.center.z - 100f - ); - cam.transform.rotation = Quaternion.identity; - - return cam; - } - - /// - /// 渲染SpriteRenderer到RenderTexture - /// - private static void RenderSpritesToTexture( - SpriteRenderer[] renderers, - Camera camera) - { - // 按sortingOrder排序 - var sortedRenderers = renderers - .OrderBy(r => r.sortingLayerID) - .ThenBy(r => r.sortingOrder) - .ToArray(); - - // 使用CommandBuffer来确保立即渲染 - CommandBuffer cmd = new CommandBuffer(); - cmd.name = "SpriteMerger"; - - // 设置RenderTexture - cmd.SetRenderTarget(camera.targetTexture); - cmd.ClearRenderTarget(true, true, new Color(0, 0, 0, 0)); - - // 为每个SpriteRenderer创建Mesh并绘制 - foreach (var renderer in sortedRenderers) - { - if (renderer.sprite == null) continue; - - Mesh mesh = CreateSpriteMesh(renderer); - if (mesh == null) continue; - - Material material = renderer.sharedMaterial != null ? renderer.sharedMaterial : GetDefaultSpriteMaterial(); - if (material == null) continue; - - MaterialPropertyBlock mpb = new MaterialPropertyBlock(); - renderer.GetPropertyBlock(mpb); - - // 应用颜色 - Color color = renderer.color; - mpb.SetColor("_Color", color); - - // 使用单位矩阵(顶点已经是世界空间坐标) - Matrix4x4 matrix = Matrix4x4.identity; - - // 绘制Mesh到CommandBuffer - cmd.DrawMesh(mesh, matrix, material, 0, 0, mpb); - } - - // 执行CommandBuffer - Graphics.ExecuteCommandBuffer(cmd); - cmd.Dispose(); - } - - /// - /// 为SpriteRenderer创建Mesh(使用世界空间坐标) - /// - private static Mesh CreateSpriteMesh(SpriteRenderer renderer) - { - Sprite sprite = renderer.sprite; - if (sprite == null) return null; - - // 获取Sprite的UV和三角形信息 - Vector2[] uvs = sprite.uv; - ushort[] triangles = sprite.triangles; - - // 计算世界位置 - Vector3 worldPos = renderer.transform.position; - Vector3 spriteBoundsCenter = sprite.bounds.center; - Vector3 spriteBoundsSize = sprite.bounds.size; - - // Sprite的世界中心位置 - Vector3 spriteWorldCenter = worldPos + spriteBoundsCenter; - - // 计算Sprite的四个角点(相对于sprite中心,单位:世界单位) - float halfWidth = spriteBoundsSize.x / 2f; - float halfHeight = spriteBoundsSize.y / 2f; - - // 构建四个角的世界坐标 - Vector3[] worldCorners = new Vector3[] - { - spriteWorldCenter + new Vector3(-halfWidth, -halfHeight, 0), // 左下 - spriteWorldCenter + new Vector3(-halfWidth, halfHeight, 0), // 左上 - spriteWorldCenter + new Vector3(halfWidth, halfHeight, 0), // 右上 - spriteWorldCenter + new Vector3(halfWidth, -halfHeight, 0) // 右下 - }; - - // 创建顶点数组(使用UV数量,根据UV映射到正确的角点) - Vector3[] vertices = new Vector3[uvs.Length]; - - // 将UV坐标映射到世界坐标的角点 - for (int i = 0; i < uvs.Length; i++) - { - Vector2 uv = uvs[i]; - - // 找到最接近的角点UV - int cornerIndex = 0; - float minDist = float.MaxValue; - Vector2[] cornerUVs = new Vector2[] - { - new Vector2(0, 0), // 左下 - new Vector2(0, 1), // 左上 - new Vector2(1, 1), // 右上 - new Vector2(1, 0) // 右下 - }; - - for (int j = 0; j < cornerUVs.Length; j++) - { - float dist = Vector2.Distance(uv, cornerUVs[j]); - if (dist < minDist) - { - minDist = dist; - cornerIndex = j; - } - } - - // 使用世界空间坐标 - vertices[i] = worldCorners[cornerIndex]; - } - - // 创建Mesh - Mesh mesh = new Mesh(); - mesh.vertices = vertices; - mesh.uv = uvs; - mesh.triangles = System.Array.ConvertAll(triangles, x => (int)x); - mesh.RecalculateNormals(); - mesh.RecalculateBounds(); - - return mesh; - } - - /// - /// 获取默认Sprite材质 - /// - private static Material GetDefaultSpriteMaterial() - { - // 使用Unity内置的Sprites/Default材质 - return new Material(Shader.Find("Sprites/Default")); - } - - /// - /// 从RenderTexture读取像素数据 - /// - private static Texture2D ReadRenderTexture(RenderTexture renderTexture) - { - RenderTexture previousActive = RenderTexture.active; - RenderTexture.active = renderTexture; - - Texture2D texture2D = new Texture2D( - renderTexture.width, - renderTexture.height, - TextureFormat.RGBA32, - false - ); - - texture2D.ReadPixels(new Rect(0, 0, renderTexture.width, renderTexture.height), 0, 0); - texture2D.Apply(); - - RenderTexture.active = previousActive; - - return texture2D; - } - - /// - /// 将Texture2D转换为Sprite - /// - private static Sprite TextureToSprite(Texture2D texture, float pixelsPerUnit) - { - Sprite sprite = Sprite.Create( - texture, - new Rect(0, 0, texture.width, texture.height), - new Vector2(0.5f, 0.5f), // pivot在中心 - pixelsPerUnit - ); - - return sprite; - } - - /// - /// 清理临时资源 - /// - private static void CleanupResources(Camera camera, RenderTexture renderTexture) - { - if (camera != null) - { - if (camera.gameObject != null) - { - UnityEngine.Object.DestroyImmediate(camera.gameObject); - } - } - - if (renderTexture != null) - { - renderTexture.Release(); - UnityEngine.Object.DestroyImmediate(renderTexture); - } - } - - #region 异步版本 - - /// - /// 异步合并多个SpriteRenderer为一个Sprite(协程版本) - /// - /// 要合并的SpriteRenderer数组 - /// 完成回调 - /// 输出纹理宽度(像素),0则自动计算 - /// 输出纹理高度(像素),0则自动计算 - /// Sprite的pixelsPerUnit - /// 每帧处理的Sprite数量,用于控制性能 - /// 协程 - public static IEnumerator MergeSpriteRenderersAsync( - SpriteRenderer[] renderers, - Action onComplete, - int textureWidth = 0, - int textureHeight = 0, - float pixelsPerUnit = 100f, - int spritesPerFrame = 5) - { - if (renderers == null || renderers.Length == 0) - { - Debug.LogError("SpriteRenderer数组为空"); - onComplete?.Invoke(new MergeResult()); - yield break; - } - - // 过滤掉无效的renderer - var validRenderers = renderers.Where(r => r != null && r.sprite != null).ToArray(); - if (validRenderers.Length == 0) - { - Debug.LogError("没有有效的SpriteRenderer"); - onComplete?.Invoke(new MergeResult()); - yield break; - } - - // 1. 计算世界空间包围盒(分帧执行) - Bounds worldBounds = new Bounds(); - bool boundsCalculated = false; - yield return CalculateWorldBoundsAsync(validRenderers, result => - { - worldBounds = result; - boundsCalculated = true; - }); - - while (!boundsCalculated) - { - yield return null; - } - - // 2. 确定纹理尺寸 - if (textureWidth <= 0 || textureHeight <= 0) - { - float aspect = worldBounds.size.x / worldBounds.size.y; - if (aspect > 1f) - { - textureWidth = Mathf.NextPowerOfTwo(Mathf.CeilToInt(worldBounds.size.x * pixelsPerUnit)); - textureHeight = Mathf.NextPowerOfTwo(Mathf.CeilToInt(textureWidth / aspect)); - } - else - { - textureHeight = Mathf.NextPowerOfTwo(Mathf.CeilToInt(worldBounds.size.y * pixelsPerUnit)); - textureWidth = Mathf.NextPowerOfTwo(Mathf.CeilToInt(textureHeight * aspect)); - } - } - - // 3. 创建RenderTexture和临时Camera - RenderTexture renderTexture = null; - Camera tempCamera = null; - - try - { - renderTexture = CreateRenderTexture(textureWidth, textureHeight); - tempCamera = CreateTempCamera(worldBounds, renderTexture); - - // 4. 异步渲染SpriteRenderer到RenderTexture(分帧执行) - yield return RenderSpritesToTextureAsync(validRenderers, tempCamera, spritesPerFrame); - - // 5. 读取为Texture2D(分帧执行) - Texture2D texture2D = null; - bool textureRead = false; - yield return ReadRenderTextureAsync(renderTexture, result => - { - texture2D = result; - textureRead = true; - }); - - while (!textureRead) - { - yield return null; - } - - // 6. 转换为Sprite - Sprite sprite = TextureToSprite(texture2D, pixelsPerUnit); - - // 7. 返回结果 - onComplete?.Invoke(new MergeResult - { - sprite = sprite, - worldPosition = worldBounds.center, - worldBounds = worldBounds - }); - } - finally - { - // 清理资源 - CleanupResources(tempCamera, renderTexture); - } - } - - /// - /// 异步计算世界空间包围盒 - /// - private static IEnumerator CalculateWorldBoundsAsync(SpriteRenderer[] renderers, Action onComplete) - { - if (renderers.Length == 0) - { - onComplete?.Invoke(new Bounds()); - yield break; - } - - bool first = true; - Bounds bounds = new Bounds(); - - // 分帧计算,每帧处理一部分 - int processed = 0; - int batchSize = 10; // 每帧处理的renderer数量 - - while (processed < renderers.Length) - { - int endIndex = Mathf.Min(processed + batchSize, renderers.Length); - - for (int i = processed; i < endIndex; i++) - { - var renderer = renderers[i]; - if (renderer.sprite == null) continue; - - Bounds spriteBounds = renderer.sprite.bounds; - Vector3 worldPos = renderer.transform.position; - Vector3 center = worldPos + spriteBounds.center; - Vector3 size = spriteBounds.size; - - Vector3[] corners = new Vector3[] - { - center + new Vector3(-size.x / 2, -size.y / 2, 0), - center + new Vector3(size.x / 2, -size.y / 2, 0), - center + new Vector3(-size.x / 2, size.y / 2, 0), - center + new Vector3(size.x / 2, size.y / 2, 0) - }; - - if (first) - { - bounds = new Bounds(corners[0], Vector3.zero); - first = false; - } - - foreach (var corner in corners) - { - bounds.Encapsulate(corner); - } - } - - processed = endIndex; - yield return null; // 每批处理完后让出一帧 - } - - onComplete?.Invoke(bounds); - } - - /// - /// 异步渲染SpriteRenderer到RenderTexture(分帧执行) - /// - private static IEnumerator RenderSpritesToTextureAsync( - SpriteRenderer[] renderers, - Camera camera, - int spritesPerFrame) - { - // 按sortingOrder排序 - var sortedRenderers = renderers - .OrderBy(r => r.sortingLayerID) - .ThenBy(r => r.sortingOrder) - .ToArray(); - - // 使用CommandBuffer来确保立即渲染 - CommandBuffer cmd = new CommandBuffer(); - cmd.name = "SpriteMerger"; - - // 设置RenderTexture - cmd.SetRenderTarget(camera.targetTexture); - cmd.ClearRenderTarget(true, true, new Color(0, 0, 0, 0)); - - // 预先创建所有Mesh(分帧执行) - List meshes = new List(); - List materials = new List(); - List mpbs = new List(); - - int processed = 0; - while (processed < sortedRenderers.Length) - { - int endIndex = Mathf.Min(processed + spritesPerFrame, sortedRenderers.Length); - - for (int i = processed; i < endIndex; i++) - { - var renderer = sortedRenderers[i]; - if (renderer.sprite == null) continue; - - Mesh mesh = CreateSpriteMesh(renderer); - if (mesh == null) continue; - - Material material = renderer.sharedMaterial != null ? renderer.sharedMaterial : GetDefaultSpriteMaterial(); - if (material == null) continue; - - MaterialPropertyBlock mpb = new MaterialPropertyBlock(); - renderer.GetPropertyBlock(mpb); - Color color = renderer.color; - mpb.SetColor("_Color", color); - - meshes.Add(mesh); - materials.Add(material); - mpbs.Add(mpb); - } - - processed = endIndex; - yield return null; // 每批处理完后让出一帧 - } - - // 一次性绘制所有Mesh - for (int i = 0; i < meshes.Count; i++) - { - cmd.DrawMesh(meshes[i], Matrix4x4.identity, materials[i], 0, 0, mpbs[i]); - } - - // 执行CommandBuffer - Graphics.ExecuteCommandBuffer(cmd); - cmd.Dispose(); - - // 清理临时创建的Mesh(避免内存泄漏) - foreach (var mesh in meshes) - { - if (mesh != null) - { - UnityEngine.Object.DestroyImmediate(mesh); - } - } - } - - /// - /// 异步从RenderTexture读取像素数据 - /// - private static IEnumerator ReadRenderTextureAsync(RenderTexture renderTexture, Action onComplete) - { - // ReadPixels是同步操作,但我们可以分块读取来减少卡顿 - RenderTexture previousActive = RenderTexture.active; - RenderTexture.active = renderTexture; - - Texture2D texture2D = new Texture2D( - renderTexture.width, - renderTexture.height, - TextureFormat.RGBA32, - false - ); - - // 读取像素(这个操作可能比较耗时) - texture2D.ReadPixels(new Rect(0, 0, renderTexture.width, renderTexture.height), 0, 0); - - yield return null; // 让出一帧 - - texture2D.Apply(); - - RenderTexture.active = previousActive; - - onComplete?.Invoke(texture2D); - } - - /// - /// 启动异步合并协程(需要MonoBehaviour实例) - /// - /// 用于启动协程的MonoBehaviour实例 - /// 要合并的SpriteRenderer数组 - /// 完成回调 - /// 输出纹理宽度(像素),0则自动计算 - /// 输出纹理高度(像素),0则自动计算 - /// Sprite的pixelsPerUnit - /// 每帧处理的Sprite数量 - public static void StartMergeAsync( - MonoBehaviour monoBehaviour, - SpriteRenderer[] renderers, - Action onComplete, - int textureWidth = 0, - int textureHeight = 0, - float pixelsPerUnit = 100f, - int spritesPerFrame = 5) - { - if (monoBehaviour == null) - { - Debug.LogError("MonoBehaviour实例为空,无法启动协程"); - onComplete?.Invoke(new MergeResult()); - return; - } - - monoBehaviour.StartCoroutine(MergeSpriteRenderersAsync( - renderers, - onComplete, - textureWidth, - textureHeight, - pixelsPerUnit, - spritesPerFrame - )); - } - - /// - /// 使用MonoCenter启动异步合并协程(推荐) - /// - public static void StartMergeAsyncWithMonoCenter( - SpriteRenderer[] renderers, - Action onComplete, - int textureWidth = 0, - int textureHeight = 0, - float pixelsPerUnit = 100f, - int spritesPerFrame = 5) - { - if (MonoCenter.Mono == null) - { - Debug.LogError("MonoCenter未初始化,无法启动协程"); - onComplete?.Invoke(new MergeResult()); - return; - } - - StartMergeAsync( - MonoCenter.Mono, - renderers, - onComplete, - textureWidth, - textureHeight, - pixelsPerUnit, - spritesPerFrame - ); - } - - #endregion - } -} - diff --git a/Assets/Scripts/SceneManagement/ActorKit/AbsActor.cs b/Assets/Scripts/SceneManagement/ActorKit/AbsActor.cs index 9b0b3cce9..d38d3f1b2 100644 --- a/Assets/Scripts/SceneManagement/ActorKit/AbsActor.cs +++ b/Assets/Scripts/SceneManagement/ActorKit/AbsActor.cs @@ -94,6 +94,10 @@ namespace AibisDream ChangeState(stateName); yield break; } + + public virtual void SetTalkingState(bool isTalking) {} + + public virtual void SetFaceState(string faceName) {} } // 工厂类 @@ -102,12 +106,14 @@ namespace AibisDream private readonly Transform _actorRoot; private readonly GameObject _actorAnimaPrefab; private readonly GameObject _spriteActorPrefab; - + private readonly GameObject _actorAnimaExPrefab; + public ActorFactory(Transform actorRoot) { _actorRoot = actorRoot; _actorAnimaPrefab = ResourceKit.LoadAssetSync(ConstRef.ActorPrefabName); _spriteActorPrefab = ResourceKit.LoadAssetSync(ConstRef.SpriteActorPrefabName); + _actorAnimaExPrefab = ResourceKit.LoadAssetSync(ConstRef.ActorAnimaExPrefabName); } public AbsActor CreateActor(string actorName, ActorSlot slot, ActorType actorType) @@ -116,6 +122,7 @@ namespace AibisDream { ActorType.Sprite => Object.Instantiate(_spriteActorPrefab, _actorRoot).GetComponent(), ActorType.Anima => Object.Instantiate(_actorAnimaPrefab, _actorRoot).GetComponent(), + ActorType.AnimaEx => Object.Instantiate(_actorAnimaExPrefab, _actorRoot).GetComponent(), _ => null }; @@ -133,6 +140,7 @@ namespace AibisDream { ActorType.Sprite => Object.Instantiate(_spriteActorPrefab, _actorRoot).GetComponent(), ActorType.Anima => Object.Instantiate(_actorAnimaPrefab, _actorRoot).GetComponent(), + ActorType.AnimaEx => Object.Instantiate(_actorAnimaExPrefab, _actorRoot).GetComponent(), _ => null }; @@ -148,7 +156,8 @@ namespace AibisDream public enum ActorType { Sprite, - Anima + Anima, + AnimaEx } [Serializable] @@ -161,5 +170,6 @@ namespace AibisDream public ActorType actorType; public string stateName; public float alpha; + public float faceParam; } } \ No newline at end of file diff --git a/Assets/Scripts/SceneManagement/ActorKit/ActorAnimaEx.cs b/Assets/Scripts/SceneManagement/ActorKit/ActorAnimaEx.cs new file mode 100644 index 000000000..226d31976 --- /dev/null +++ b/Assets/Scripts/SceneManagement/ActorKit/ActorAnimaEx.cs @@ -0,0 +1,119 @@ +using AibisDream.Framework; +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +namespace AibisDream +{ + public class ActorAnimaEx : AbsActor + { + private Animator _animator; + private string _currentStateName; + private Dictionary _blendTreeDict; + + protected override void Init() + { + _animator = GetComponent(); + // 设置基本信息 + base.Init(); + actorData.actorType = ActorType.AnimaEx; + var controller = ResourceKit.LoadAssetSync($"Animation/{ActorName}"); + _animator.runtimeAnimatorController = controller; + + _blendTreeDict = ParseBlendTreeInfos(); + + // 保存事件 + actorData.onSave.AddListener(() => + { + actorData.stateName = _currentStateName; + actorData.faceParam = _animator.GetFloat("Face Param"); + }); + + // 加载初始状态 + if (!string.IsNullOrWhiteSpace(actorData.stateName)) + { + ChangeState(actorData.stateName); + } + if (actorData.faceParam >= 0) + { + _animator.SetFloat("Face Param", actorData.faceParam); + } + } + + private Dictionary ParseBlendTreeInfos() + { + var dict = new Dictionary(); + // 解析混合树 + var configText = ResourceKit.LoadAssetSync($"AnimationConfig/{ActorName}"); + if (configText != null) + { + var blendTreeInfos = AnimatorKit.ParseBlendTreeFromJson(configText.text); + foreach (var info in blendTreeInfos) + { + dict[info.name] = info; + } + } + return dict; + } + + /// + /// 切换站姿 + /// + /// + public override void ChangeState(string stateName) + { + // 记录当前状态 + _currentStateName = stateName; + + // 切换站姿 + _animator.SetTrigger(stateName); + } + + public override IEnumerator ChangeStateAsync(string stateName) + { + ChangeState(stateName); + // 等待动作切换完成 + while (!_animator.GetCurrentAnimatorStateInfo(0).IsName(stateName)) + { + yield return null; + } + + var info = _animator.GetCurrentAnimatorStateInfo(0); + yield return new WaitForSeconds(info.length); + } + + public override void SetTalkingState(bool isTalking) + { + _animator.SetBool("Is Talking", isTalking); + } + + public override void SetFaceState(string faceName) + { + // 先读取当前混合树信息 + if (_blendTreeDict.TryGetValue(_currentStateName, out var blendTreeInfo)) + { + if (blendTreeInfo.type == "1D") + { + var clipInfo = blendTreeInfo.GetClipInfo(faceName); + if (clipInfo != null) + { + _animator.SetFloat(blendTreeInfo.blendParameter, clipInfo.threshold); + } + } + else + { + var clipInfo = blendTreeInfo.GetClipInfo(faceName); + if (clipInfo != null) + { + _animator.SetFloat(blendTreeInfo.blendParameter, clipInfo.position.x); + // 不设置Y轴参数 + } + } + } + else + { + Debug.LogWarning($"当前状态{_currentStateName}的混合树信息不存在"); + } + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/SceneManagement/ActorKit/ActorAnimaEx.cs.meta b/Assets/Scripts/SceneManagement/ActorKit/ActorAnimaEx.cs.meta new file mode 100644 index 000000000..1f6129dc0 --- /dev/null +++ b/Assets/Scripts/SceneManagement/ActorKit/ActorAnimaEx.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 79080239c808e074cbbffada2dd2045b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/SceneManagement/ActorKit/ActorManager.cs b/Assets/Scripts/SceneManagement/ActorKit/ActorManager.cs index 3ae6dad3c..b63f6c509 100644 --- a/Assets/Scripts/SceneManagement/ActorKit/ActorManager.cs +++ b/Assets/Scripts/SceneManagement/ActorKit/ActorManager.cs @@ -76,7 +76,7 @@ namespace AibisDream // 注册数据 _actorSystemData = new ActorSystemData(); _actorSystemData.OnLoad += OnDataLoad; - StorageSystem.Instance.RegisterData(_actorSystemData); + // StorageSystem.Instance.RegisterData(_actorSystemData); } private void OnDataLoad(ActorSystemData data) @@ -230,6 +230,15 @@ namespace AibisDream actor.Hide(); } } + + [YarnCommand("set_actor_face")] + public static void SetFaceState(string actorName = ClinicSlotName, string faceName = "默认") + { + if (ActorManager.Instance.TryFindActor(actorName, out var actor)) + { + actor.SetFaceState(faceName); + } + } } [Serializable] diff --git a/Assets/Scripts/Framework/Utility.meta b/Assets/Scripts/Test.meta similarity index 77% rename from Assets/Scripts/Framework/Utility.meta rename to Assets/Scripts/Test.meta index a39686fbb..f8f0cf026 100644 --- a/Assets/Scripts/Framework/Utility.meta +++ b/Assets/Scripts/Test.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: e479a36e7ca66ec4ea9e4a0b3cbaa247 +guid: cb9129adc6257474b8342b4dd4ceeebb folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/Scripts/Test/ActorAnimaExTest.cs b/Assets/Scripts/Test/ActorAnimaExTest.cs new file mode 100644 index 000000000..2bad68762 --- /dev/null +++ b/Assets/Scripts/Test/ActorAnimaExTest.cs @@ -0,0 +1,392 @@ +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using AibisDream.Framework; +using UnityEngine; + +namespace AibisDream.Test +{ + /// + /// ActorAnimaEx 功能测试脚本 + /// 使用键盘按键触发各项测试功能 + /// + public class ActorAnimaExTest : MonoBehaviour + { + [Header("测试配置")] + [SerializeField] private string testActorName = "调酒妹测试"; + [SerializeField] private string testSlotName = "测试"; + + [Header("调试信息")] + [SerializeField] private bool showHelp = true; + + private ActorAnimaEx _testActor; + private List _blendTreeInfos; + private List _stateNames; + private Dictionary> _faceNamesByState; + + private int _currentStateIndex = 0; + private Dictionary _currentFaceIndexByState; + private bool _isTalking = false; + + private void Start() + { + _currentFaceIndexByState = new Dictionary(); + _faceNamesByState = new Dictionary>(); + + if (showHelp) + { + PrintHelp(); + } + } + + private void Update() + { + // 检测键盘输入 + if (Input.GetKeyDown(KeyCode.Alpha1)) + { + TestInitActor(); + } + else if (Input.GetKeyDown(KeyCode.Alpha2)) + { + TestChangeState(); + } + else if (Input.GetKeyDown(KeyCode.Alpha3)) + { + TestSetFaceState(); + } + else if (Input.GetKeyDown(KeyCode.Alpha4)) + { + TestSetTalkingState(); + } + else if (Input.GetKeyDown(KeyCode.Alpha5)) + { + StartCoroutine(TestCombination()); + } + else if (Input.GetKeyDown(KeyCode.R)) + { + TestReset(); + } + else if (Input.GetKeyDown(KeyCode.H)) + { + showHelp = !showHelp; + if (showHelp) + { + PrintHelp(); + } + } + } + + private void OnGUI() + { + if (!showHelp) return; + + // 显示帮助信息 + GUIStyle style = new GUIStyle(GUI.skin.box); + style.fontSize = 14; + style.normal.textColor = Color.white; + + string helpText = "=== ActorAnimaEx 测试控制 ===\n" + + "1 - 初始化测试角色\n" + + "2 - 切换状态 (ChangeState)\n" + + "3 - 切换表情 (SetFaceState)\n" + + "4 - 切换说话状态 (SetTalkingState)\n" + + "5 - 运行组合测试\n" + + "R - 重置测试\n" + + "H - 显示/隐藏帮助\n\n"; + + if (_testActor != null) + { + helpText += $"当前角色: {_testActor.ActorName}\n"; + if (_stateNames != null && _stateNames.Count > 0 && _currentStateIndex < _stateNames.Count) + { + helpText += $"当前状态: {_stateNames[_currentStateIndex]}\n"; + } + helpText += $"说话状态: {(_isTalking ? "开启" : "关闭")}\n"; + } + + GUI.Box(new Rect(10, 10, 300, helpText.Split('\n').Length * 20 + 20), helpText, style); + } + + /// + /// 打印帮助信息到控制台 + /// + private void PrintHelp() + { + Debug.Log("=== ActorAnimaEx 测试控制 ===\n" + + "1 - 初始化测试角色\n" + + "2 - 切换状态 (ChangeState)\n" + + "3 - 切换表情 (SetFaceState)\n" + + "4 - 切换说话状态 (SetTalkingState)\n" + + "5 - 运行组合测试\n" + + "R - 重置测试\n" + + "H - 显示/隐藏帮助"); + } + + /// + /// 测试 1: 初始化测试角色 + /// + private void TestInitActor() + { + Debug.Log("=== 测试 1: 初始化测试角色 ==="); + + try + { + // 检查 ActorManager 是否已初始化 + if (ActorManager.Instance == null) + { + Debug.LogError("ActorManager 未初始化!"); + return; + } + + // 销毁已存在的测试角色 + if (_testActor != null) + { + Destroy(_testActor.gameObject); + _testActor = null; + } + + // 创建测试角色 + _testActor = ActorManager.Instance.InitActor(testActorName, testSlotName, ActorType.AnimaEx) as ActorAnimaEx; + + if (_testActor == null) + { + Debug.LogError($"创建角色失败: {testActorName}"); + return; + } + + Debug.Log($"✓ 角色创建成功: {_testActor.ActorName}"); + + // 显示角色 + _testActor.Show(); + + // 加载混合树配置 + LoadBlendTreeConfig(); + + Debug.Log("✓ 初始化测试完成"); + } + catch (System.Exception e) + { + Debug.LogError($"初始化测试失败: {e.Message}\n{e.StackTrace}"); + } + } + + /// + /// 加载混合树配置 + /// + private void LoadBlendTreeConfig() + { + var configText = ResourceKit.LoadAssetSync($"AnimationConfig/{testActorName}"); + if (configText == null) + { + Debug.LogWarning($"未找到配置文件: AnimationConfig/{testActorName}"); + return; + } + + _blendTreeInfos = AnimatorKit.ParseBlendTreeFromJson(configText.text); + + if (_blendTreeInfos == null || _blendTreeInfos.Count == 0) + { + Debug.LogWarning("混合树配置为空或解析失败"); + return; + } + + // 提取状态名称列表 + _stateNames = _blendTreeInfos.Select(info => info.name).ToList(); + + // 为每个状态提取表情名称列表 + _faceNamesByState.Clear(); + _currentFaceIndexByState.Clear(); + + foreach (var info in _blendTreeInfos) + { + if (info.clips != null && info.clips.Count > 0) + { + var faceNames = info.clips.Select(clip => clip.clipName).ToList(); + _faceNamesByState[info.name] = faceNames; + _currentFaceIndexByState[info.name] = 0; + } + } + + Debug.Log($"✓ 加载混合树配置成功: {_blendTreeInfos.Count} 个状态"); + foreach (var stateName in _stateNames) + { + Debug.Log($" - 状态: {stateName}"); + if (_faceNamesByState.TryGetValue(stateName, out var faces) && faces.Count > 0) + { + Debug.Log($" 表情数量: {faces.Count}"); + } + } + } + + /// + /// 测试 2: 切换状态 + /// + private void TestChangeState() + { + if (_testActor == null) + { + Debug.LogWarning("请先初始化测试角色 (按 1)"); + return; + } + + if (_stateNames == null || _stateNames.Count == 0) + { + Debug.LogWarning("没有可用的状态"); + return; + } + + // 循环切换到下一个状态 + string nextState = _stateNames[_currentStateIndex]; + Debug.Log($"=== 测试 2: 切换状态到 '{nextState}' ==="); + + _testActor.ChangeState(nextState); + + Debug.Log($"✓ 状态已切换到: {nextState}"); + + // 更新索引 + _currentStateIndex = (_currentStateIndex + 1) % _stateNames.Count; + } + + /// + /// 测试 3: 切换表情 + /// + private void TestSetFaceState() + { + if (_testActor == null) + { + Debug.LogWarning("请先初始化测试角色 (按 1)"); + return; + } + + if (_stateNames == null || _stateNames.Count == 0 || _currentStateIndex >= _stateNames.Count) + { + Debug.LogWarning("没有可用的状态"); + return; + } + + string currentState = _stateNames[_currentStateIndex]; + + if (!_faceNamesByState.TryGetValue(currentState, out var faceNames) || faceNames.Count == 0) + { + Debug.LogWarning($"当前状态 '{currentState}' 没有可用的表情"); + return; + } + + // 获取当前状态的表情索引 + if (!_currentFaceIndexByState.TryGetValue(currentState, out int faceIndex)) + { + faceIndex = 0; + _currentFaceIndexByState[currentState] = 0; + } + + // 循环切换到下一个表情 + string nextFace = faceNames[faceIndex]; + Debug.Log($"=== 测试 3: 切换表情到 '{nextFace}' (状态: {currentState}) ==="); + + _testActor.SetFaceState(nextFace); + + Debug.Log($"✓ 表情已切换到: {nextFace}"); + + // 更新索引 + faceIndex = (faceIndex + 1) % faceNames.Count; + _currentFaceIndexByState[currentState] = faceIndex; + } + + /// + /// 测试 4: 切换说话状态 + /// + private void TestSetTalkingState() + { + if (_testActor == null) + { + Debug.LogWarning("请先初始化测试角色 (按 1)"); + return; + } + + _isTalking = !_isTalking; + Debug.Log($"=== 测试 4: 切换说话状态到 '{(_isTalking ? "开启" : "关闭")}' ==="); + + _testActor.SetTalkingState(_isTalking); + + Debug.Log($"✓ 说话状态已切换: {(_isTalking ? "开启" : "关闭")}"); + } + + /// + /// 测试 5: 组合测试 + /// + private IEnumerator TestCombination() + { + if (_testActor == null) + { + Debug.LogWarning("请先初始化测试角色 (按 1)"); + yield break; + } + + if (_stateNames == null || _stateNames.Count == 0) + { + Debug.LogWarning("没有可用的状态"); + yield break; + } + + Debug.Log("=== 测试 5: 组合测试开始 ==="); + + // 测试在不同状态下切换表情 + foreach (var stateName in _stateNames) + { + Debug.Log($"\n--- 切换到状态: {stateName} ---"); + _testActor.ChangeState(stateName); + + // 等待状态切换完成 + yield return new WaitForSeconds(0.5f); + + // 如果该状态有表情,测试切换表情 + if (_faceNamesByState.TryGetValue(stateName, out var faceNames) && faceNames.Count > 0) + { + foreach (var faceName in faceNames) + { + Debug.Log($" 设置表情: {faceName}"); + _testActor.SetFaceState(faceName); + yield return new WaitForSeconds(0.3f); + } + } + + yield return new WaitForSeconds(0.5f); + } + + // 测试说话状态 + Debug.Log("\n--- 测试说话状态 ---"); + _testActor.SetTalkingState(true); + yield return new WaitForSeconds(1f); + _testActor.SetTalkingState(false); + yield return new WaitForSeconds(0.5f); + + Debug.Log("=== 组合测试完成 ==="); + } + + /// + /// 重置测试 + /// + private void TestReset() + { + Debug.Log("=== 重置测试 ==="); + + // 销毁当前角色 + if (_testActor != null) + { + Destroy(_testActor.gameObject); + _testActor = null; + } + + // 重置状态 + _currentStateIndex = 0; + _currentFaceIndexByState.Clear(); + _isTalking = false; + _blendTreeInfos = null; + _stateNames = null; + _faceNamesByState.Clear(); + + Debug.Log("✓ 测试已重置,可以重新初始化 (按 1)"); + } + } +} + diff --git a/Assets/Scripts/Test/ActorAnimaExTest.cs.meta b/Assets/Scripts/Test/ActorAnimaExTest.cs.meta new file mode 100644 index 000000000..fe90c01ad --- /dev/null +++ b/Assets/Scripts/Test/ActorAnimaExTest.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ad8285f6dc2406249bd2c4be2571999d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Utility/ConstRef.cs b/Assets/Scripts/Utility/ConstRef.cs index 70fed7173..32a635988 100644 --- a/Assets/Scripts/Utility/ConstRef.cs +++ b/Assets/Scripts/Utility/ConstRef.cs @@ -56,8 +56,8 @@ namespace AibisDream.Utility public const string ScreenTextName = "Screen Text"; public const string ActorPrefabName = "ActorAnima"; - public const string SpriteActorPrefabName = "SpriteActor"; + public const string ActorAnimaExPrefabName = "ActorAnimaEx"; public const string MobileAnima = "AnimaMobileObject"; public const string MobileSprite = "SpriteMobileObject";