| | |
| | | public class UpdateAllSetting
|
| | | {
|
| | |
|
| | | [MenuItem("程序/设置资源包名/更新全部ABLabel(不包括lua)")]
|
| | | [MenuItem("程序/设置资源包名/更新全部ABLabel")]
|
| | | public static void SetAllAssetBundleName()
|
| | | {
|
| | | UpdateSpriteSetting.SetAllSpriteAssetBundleName();
|
| | |
| | | UpdateAudioSetting.SetAllAudioAssetBundleName();
|
| | | UpdateVideoSetting.SetAllVideoAssetBundleName();
|
| | | UpdateBuiltInSetting.SetBuiltinAssetBundleName();
|
| | | UpdateScriptableObjectsSetting.SetAllScriptableObjectAssetBundleName();
|
| | | AssetDatabase.Refresh();
|
| | | Debug.Log("资源包名全部更新完成!");
|
| | | }
|
| | |
| | |
|
| | | public class UpdateScriptableObjectsSetting
|
| | | {
|
| | | // static string rootPath = Application.dataPath + "/ResourcesOut/Refdata/ScriptableObject/";
|
| | | // static string assetPath = "Assets/ResourcesOut/Refdata/ScriptableObject/";
|
| | | // static string[] relativePaths = new string[] { "SoTreasure3D", "SoTreasureMeridian", "SoActor", "SoDeadFly", "SoBodyControl",
|
| | | // "SoCameraSFX", "SoFlyObject", "SoSkill", "SoSweepHit", "SoGhostShadow", "SoNewBieGuide", "SoMapObjectGenerate","SoDemonDungeon",
|
| | | // "SoHazyMapNpc","SoProcessNode"};
|
| | | static string rootPath = Application.dataPath + "/ResourcesOut/ScriptableObject/";
|
| | | static string assetPath = "Assets/ResourcesOut/ScriptableObject/";
|
| | | static string[] relativePaths = new string[] { "NewBieGuide"};
|
| | |
|
| | | // [MenuItem("程序/设置资源包名/更新ScriptableObject(All) AssetBundleName")]
|
| | | // public static void SetAllScriptableObjectAssetBundleName()
|
| | | // {
|
| | | // for (int i = 0; i < relativePaths.Length; i++)
|
| | | // {
|
| | | // var relativePath = relativePaths[i];
|
| | | // var allFiles = new DirectoryInfo(rootPath + relativePath).GetFiles("*.asset", SearchOption.TopDirectoryOnly);
|
| | | [MenuItem("程序/设置资源包名/更新ScriptableObject(All) AssetBundleName")]
|
| | | public static void SetAllScriptableObjectAssetBundleName()
|
| | | {
|
| | | for (int i = 0; i < relativePaths.Length; i++)
|
| | | {
|
| | | var relativePath = relativePaths[i];
|
| | | var allFiles = new DirectoryInfo(rootPath + relativePath).GetFiles("*.asset", SearchOption.TopDirectoryOnly);
|
| | |
|
| | | // foreach (var file in allFiles)
|
| | | // {
|
| | | // var importerPath = assetPath + relativePath + Path.DirectorySeparatorChar + file.Name;
|
| | | // var importer = AssetImporter.GetAtPath(importerPath);
|
| | | // importer.assetBundleName = "config/scriptableobjects";
|
| | | // // EditorUtility.SetDirty(importer);
|
| | | // }
|
| | | // }
|
| | | // Debug.Log("ScriptableObject资源包名更新完成!");
|
| | | // // AssetDatabase.SaveAssets();
|
| | | // // AssetDatabase.Refresh();
|
| | | // }
|
| | | foreach (var file in allFiles)
|
| | | {
|
| | | var importerPath = assetPath + relativePath + Path.DirectorySeparatorChar + file.Name;
|
| | | var importer = AssetImporter.GetAtPath(importerPath);
|
| | | //放置在config下
|
| | | importer.assetBundleName = "config/scriptableobject";
|
| | | }
|
| | | }
|
| | | Debug.Log("ScriptableObject资源包名更新完成! 放置在config下");
|
| | | }
|
| | | }
|
| | |
|
| | | public class UpdateLevelSetting
|