少年修仙传客户端基础资源
hch
2024-12-10 650351d224145cc692715571fc2178378bff393a
Assets/Editor/Actor/ResourcesBuilder.cs
@@ -158,16 +158,16 @@
            _originalAssetPath = string.Format("Assets/ART/Role/{0}/{1}.FBX", path, resName);
        }
        string _absAssetPath = string.Format("{0}Mob/{1}{2}.prefab", ResourcesPath.ResourcesOutPath, suffix, _tempPrefabName);
        string _assetPath = string.Format("{0}Mob/{1}{2}.prefab", ResourcesPath.ResourcesOutAssetPath, suffix, _tempPrefabName);
        string _absAssetPath = string.Format("{0}Gmodels/{1}{2}.prefab", ResourcesPath.ResourcesOutPath, suffix, _tempPrefabName);
        string _assetPath = string.Format("{0}Gmodels/{1}{2}.prefab", ResourcesPath.ResourcesOutAssetPath, suffix, _tempPrefabName);
        string _acAbsAssetPath = string.Format("{0}Mob/{1}/{2}{3}.controller", ResourcesPath.ResourcesOutPath, path, AnimatorControllerLoader.controllerSuffix, path);
        string _acAssetPath = string.Format("{0}Mob/{1}/{2}{3}.controller", ResourcesPath.ResourcesOutAssetPath, path, AnimatorControllerLoader.controllerSuffix, path);
        string _acAbsAssetPath = string.Format("{0}Gmodels/{1}/{2}{3}.controller", ResourcesPath.ResourcesOutPath, path, AnimatorControllerLoader.controllerSuffix, path);
        string _acAssetPath = string.Format("{0}Gmodels/{1}/{2}{3}.controller", ResourcesPath.ResourcesOutAssetPath, path, AnimatorControllerLoader.controllerSuffix, path);
        if (!outName.Equals(resName))
        {
            _acAbsAssetPath = string.Format("{0}Mob/{1}/{2}{3}.controller", ResourcesPath.ResourcesOutPath, path, AnimatorControllerLoader.controllerSuffix, outName);
            _acAssetPath = string.Format("{0}Mob/{1}/{2}{3}.controller", ResourcesPath.ResourcesOutAssetPath, path, AnimatorControllerLoader.controllerSuffix, outName);
            _acAbsAssetPath = string.Format("{0}Gmodels/{1}/{2}{3}.controller", ResourcesPath.ResourcesOutPath, path, AnimatorControllerLoader.controllerSuffix, outName);
            _acAssetPath = string.Format("{0}Gmodels/{1}/{2}{3}.controller", ResourcesPath.ResourcesOutAssetPath, path, AnimatorControllerLoader.controllerSuffix, outName);
        }
        if (string.IsNullOrEmpty(_absOriginalePath))
@@ -252,15 +252,15 @@
        }
        // 为了防止fbx本身就带有材质, 这里去掉fbx上的Import material属性
        ModelImporter _modelImport = AssetImporter.GetAtPath(_originalAssetPath) as ModelImporter;
        if (_modelImport != null)
        {
            if (_modelImport.importMaterials)
            {
                _modelImport.importMaterials = false;
                _modelImport.SaveAndReimport();
            }
        }
        //ModelImporter _modelImport = AssetImporter.GetAtPath(_originalAssetPath) as ModelImporter;
        //if (_modelImport != null)
        //{
        //    if (_modelImport.importMaterials)
        //    {
        //        _modelImport.importMaterials = false;
        //        _modelImport.SaveAndReimport();
        //    }
        //}
        GameObject _prefab = Object.Instantiate(_fbxRes);
@@ -294,17 +294,17 @@
        }
        // 加载特效
        if (outName.StartsWith("M")
         || outName.StartsWith("N")
         || outName.StartsWith("B_")
         || outName.StartsWith("Zq"))
        {
            HandlerModelEffect("horseEffectConfig", null, outName, ref _prefab);
        }
        else if (InstanceResourcesLoader.raceSuffix.Equals(suffix))
        {
            HandlerModelEffect("clothesEffectConfig", path, resName, ref _prefab);
        }
        //if (outName.StartsWith("M")
        // || outName.StartsWith("N")
        // || outName.StartsWith("B_")
        // || outName.StartsWith("Zq"))
        //{
        //    HandlerModelEffect("horseEffectConfig", null, outName, ref _prefab);
        //}
        //else if (InstanceResourcesLoader.raceSuffix.Equals(suffix))
        //{
        //    HandlerModelEffect("clothesEffectConfig", path, resName, ref _prefab);
        //}
        if (_colliderInfo != null)
        {
@@ -383,7 +383,7 @@
            return;
        }
        string _configPath = ResourcesPath.ResourcesOutAssetPath + "Mob/" + configName + ".asset";
        string _configPath = ResourcesPath.ResourcesOutAssetPath + "Gmodels/" + configName + ".asset";
        HorseEffectConfig _horseEffectConfig = AssetDatabase.LoadAssetAtPath<HorseEffectConfig>(_configPath);
        if (_horseEffectConfig == null
         || _horseEffectConfig.effectConfigList == null
@@ -477,8 +477,8 @@
    {
        string _absOriginaleDirectory = string.Format("{0}/ART/Role/{1}", Application.dataPath, path);
        string _assetOriginalDirectory = string.Format("Assets/ART/Role/{0}", path);
        string _absAssetDirectory = string.Format("{0}/ResourcesOut/Mob/{1}/AnimationClips", Application.dataPath, path);
        string _assetDirectory = string.Format("Assets/ResourcesOut/Mob/{0}/AnimationClips", path);
        string _absAssetDirectory = string.Format("{0}/ResourcesOut/Gmodels/{1}/AnimationClips", Application.dataPath, path);
        string _assetDirectory = string.Format("Assets/ResourcesOut/Gmodels/{0}/AnimationClips", path);
        if (!Directory.Exists(_absOriginaleDirectory))
        {
@@ -569,35 +569,35 @@
            outName = resName;
        }
        string _absAssetPath = string.Format("{0}Mob/{1}", ResourcesPath.ResourcesOutPath, outName);
        string _absAssetPath = string.Format("{0}Gmodels/{1}", ResourcesPath.ResourcesOutPath, outName);
        if (!Directory.Exists(_absAssetPath))
        {
            Directory.CreateDirectory(_absAssetPath);
        }
        _absAssetPath = string.Format("{0}Mob/{1}/{2}{3}.controller", ResourcesPath.ResourcesOutPath, outName, AnimatorControllerLoader.controllerSuffix, outName);
        string _assetPath = string.Format("{0}Mob/{1}/{2}{3}.controller", ResourcesPath.ResourcesOutAssetPath, outName, AnimatorControllerLoader.controllerSuffix, outName);
        _absAssetPath = string.Format("{0}Gmodels/{1}/{2}{3}.controller", ResourcesPath.ResourcesOutPath, outName, AnimatorControllerLoader.controllerSuffix, outName);
        string _assetPath = string.Format("{0}Gmodels/{1}/{2}{3}.controller", ResourcesPath.ResourcesOutAssetPath, outName, 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);
            _absAssetPath = string.Format("{0}Gmodels/{1}/{2}{3}.controller", ResourcesPath.ResourcesOutPath, resName, AnimatorControllerLoader.controllerShowSuffix, resName);
            _assetPath = string.Format("{0}Gmodels/{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);
            _absAssetPath = string.Format("{0}Gmodels/{1}/{2}{3}.controller", ResourcesPath.ResourcesOutPath, resName, AnimatorControllerLoader.controllerRealmSuffix, resName);
            _assetPath = string.Format("{0}Gmodels/{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, outName, AnimatorControllerLoader.controllerUISuffix, outName);
            _assetPath = string.Format("{0}Mob/{1}/{2}{3}.controller", ResourcesPath.ResourcesOutAssetPath, outName, AnimatorControllerLoader.controllerUISuffix, outName);
            _absAssetPath = string.Format("{0}Gmodels/{1}/{2}{3}.controller", ResourcesPath.ResourcesOutPath, outName, AnimatorControllerLoader.controllerUISuffix, outName);
            _assetPath = string.Format("{0}Gmodels/{1}/{2}{3}.controller", ResourcesPath.ResourcesOutAssetPath, outName, AnimatorControllerLoader.controllerUISuffix, outName);
        }
        string _templePath = string.Format("{0}Mob/{1}.controller", ResourcesPath.ResourcesOutPath, templeName);
        string _templePath = string.Format("{0}Gmodels/{1}.controller", ResourcesPath.ResourcesOutPath, templeName);
        if (File.Exists(_absAssetPath))
        {
@@ -628,7 +628,7 @@
        // 读取配置文件
        string _configPath = StringUtility.Contact(ResourcesPath.ResourcesOutAssetPath,
                                                  "mob/",
                                                  "gmodels/",
                                                  configName,
                                                  ".asset");
@@ -729,7 +729,7 @@
    {
        string _assetPath = StringUtility.Contact(ResourcesPath.ResourcesOutAssetPath,
                                                 "mob/",
                                                 "gmodels/",
                                                  modelName,
                                                 "/AnimationClips/",
                                                 clipName,