3732 【前端】场景Npc读取待机动作2号, 生成工具
| | |
| | | private bool m_GenerateAnimationClip = false; |
| | | private bool m_GenerateController = false; |
| | | private bool m_GeneratePrefab = false; |
| | | private bool m_GenerateUIController = false; |
| | | |
| | | private int m_ModelResID; |
| | | private int m_NpcID; |
| | |
| | | m_GeneratePrefab = GUILayout.Toggle(m_GeneratePrefab, "Prefab"); |
| | | m_GenerateAnimationClip = GUILayout.Toggle(m_GenerateAnimationClip, "Clips"); |
| | | m_GenerateController = GUILayout.Toggle(m_GenerateController, "Controller"); |
| | | m_GenerateUIController = GUILayout.Toggle(m_GenerateUIController, "UI_Controller"); |
| | | ResourcesBuilder.OnlyBuildNoExist = m_GenerateNoExist; |
| | | ResourcesBuilder.IsBuildPrefab = m_GeneratePrefab; |
| | | ResourcesBuilder.IsBuildAnimationClip = m_GenerateAnimationClip; |
| | | ResourcesBuilder.IsBuildAnimatorController = m_GenerateController; |
| | | ResourcesBuilder.IsBuildAnimatorUIController = m_GenerateUIController; |
| | | EditorGUILayout.EndHorizontal(); |
| | | |
| | | if (GUILayout.Button("单独生成", GUILayout.Height(24))) |
| | |
| | |
|
| | | public void BuildAnimatorController(string modelName, string outName = null, int type = -1)
|
| | | {
|
| | | if (!IsBuildAnimatorController)
|
| | | if (!IsBuildAnimatorController && !IsBuildAnimatorUIController)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
| | | {
|
| | | BuildAnimatorController(modelName, "Temple_AnimatorController_Horse", "animatorBuildConfig", outName);
|
| | | }
|
| | |
|
| | | if(ResourcesBuilder.IsBuildAnimatorUIController)
|
| | | {
|
| | | BuildAnimatorController(modelName, "Temple_AnimatorController_UI", "animatorBuildConfig", outName);
|
| | | }
|
| | | }
|
| | |
|
| | | public void BuildBossShowAnimatorController(string modelName)
|
| | |
| | | protected const byte param_Prefab = 2;
|
| | | protected const byte param_Clip = 4;
|
| | | protected const byte param_AnimatorController = 8;
|
| | | protected const byte param_AnimatorUIController = 16;
|
| | |
|
| | | protected class MountPointInfo
|
| | | {
|
| | |
| | | else
|
| | | {
|
| | | buildParams &= ~param_AnimatorController;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public static bool IsBuildAnimatorUIController
|
| | | {
|
| | | get
|
| | | {
|
| | | return (buildParams & param_AnimatorUIController) != 0;
|
| | | }
|
| | | set
|
| | | {
|
| | | if (value)
|
| | | {
|
| | | buildParams |= param_AnimatorUIController;
|
| | | }
|
| | | else
|
| | | {
|
| | | buildParams &= ~param_AnimatorUIController;
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | }
|
| | |
|
| | | _absAssetPath = string.Format("{0}Mob/{1}/{2}{3}.controller", ResourcesPath.ResourcesOutPath, resName, AnimatorControllerLoader.controllerSuffix, outName);
|
| | |
|
| | | string _assetPath = string.Format("{0}Mob/{1}/{2}{3}.controller", ResourcesPath.ResourcesOutAssetPath, resName, AnimatorControllerLoader.controllerSuffix, outName);
|
| | |
|
| | | if (templeName.Equals("Temple_AnimatorController_BossShow"))
|
| | | {
|
| | | _absAssetPath = string.Format("{0}Mob/{1}/{2}{3}.controller", ResourcesPath.ResourcesOutPath, resName, AnimatorControllerLoader.controllerShowSuffix, resName);
|
| | | _assetPath = string.Format("{0}Mob/{1}/{2}{3}.controller", ResourcesPath.ResourcesOutAssetPath, resName, AnimatorControllerLoader.controllerShowSuffix, resName);
|
| | | }
|
| | |
|
| | | if (templeName.Equals("Temple_AnimatorController_Realm"))
|
| | | {
|
| | | _absAssetPath = string.Format("{0}Mob/{1}/{2}{3}.controller", ResourcesPath.ResourcesOutPath, resName, AnimatorControllerLoader.controllerRealmSuffix, resName);
|
| | | _assetPath = string.Format("{0}Mob/{1}/{2}{3}.controller", ResourcesPath.ResourcesOutAssetPath, resName, AnimatorControllerLoader.controllerRealmSuffix, resName);
|
| | | }
|
| | |
|
| | | if(templeName.Equals("Temple_AnimatorController_UI"))
|
| | | {
|
| | | _absAssetPath = string.Format("{0}Mob/{1}/{2}{3}.controller", ResourcesPath.ResourcesOutPath, resName, AnimatorControllerLoader.controllerUISuffix, resName);
|
| | | _assetPath = string.Format("{0}Mob/{1}/{2}{3}.controller", ResourcesPath.ResourcesOutAssetPath, resName, AnimatorControllerLoader.controllerUISuffix, resName);
|
| | | }
|
| | |
|
| | | string _templePath = string.Format("{0}Mob/{1}.controller", ResourcesPath.ResourcesOutPath, templeName);
|
| | |
|
| | | if (File.Exists(_absAssetPath))
|