| | |
| | |
|
| | | public class UpdateUIPrefabSetting
|
| | | {
|
| | | static string rootPath = Application.dataPath + "/ResourcesOut/UI/Prefab";
|
| | | static string assetRelativePath = "Assets/ResourcesOut/UI/Prefab";
|
| | | static string prefabRootPath = Application.dataPath + "/ResourcesOut/UI/Prefab";
|
| | | static string prefabAssetRelativePath = "Assets/ResourcesOut/UI/Prefab";
|
| | |
|
| | | static string bossShowRootPath = Application.dataPath + "/ResourcesOut/UI/BossShow";
|
| | | static string bossShowAssetRelativePath = "Assets/ResourcesOut/UI/BossShow";
|
| | |
|
| | | static string godWeaponRootPath = Application.dataPath + "/ResourcesOut/UI/GodWeapon";
|
| | | static string godWeaponAssetRelativePath = "Assets/ResourcesOut/UI/GodWeapon";
|
| | |
|
| | | static string treasureRootPath = Application.dataPath + "/ResourcesOut/UI/Treasure";
|
| | | static string treasureAssetRelativePath = "Assets/ResourcesOut/UI/Treasure";
|
| | |
|
| | | [MenuItem("程序/设置资源包名/更新Prefab(All) AssetBundleName")]
|
| | | public static void SetAllUIPrefabAssetBundleName()
|
| | | {
|
| | | var allFiles = new DirectoryInfo(rootPath).GetFiles("*.prefab", SearchOption.TopDirectoryOnly);
|
| | |
|
| | | var allFiles = new DirectoryInfo(prefabRootPath).GetFiles("*.prefab", SearchOption.TopDirectoryOnly);
|
| | | foreach (var file in allFiles)
|
| | | {
|
| | | var importerPath = assetRelativePath + Path.DirectorySeparatorChar + file.Name;
|
| | | var importerPath = prefabAssetRelativePath + Path.DirectorySeparatorChar + file.Name;
|
| | | var importer = AssetImporter.GetAtPath(importerPath);
|
| | | importer.assetBundleName = "ui/prefab";
|
| | | EditorUtility.SetDirty(importer);
|
| | | }
|
| | |
|
| | | allFiles = new DirectoryInfo(bossShowRootPath).GetFiles("*.prefab", SearchOption.TopDirectoryOnly);
|
| | | foreach (var file in allFiles)
|
| | | {
|
| | | var importerPath = bossShowAssetRelativePath + Path.DirectorySeparatorChar + file.Name;
|
| | | var importer = AssetImporter.GetAtPath(importerPath);
|
| | | importer.assetBundleName = "ui/bossshow";
|
| | | EditorUtility.SetDirty(importer);
|
| | | }
|
| | |
|
| | | allFiles = new DirectoryInfo(godWeaponRootPath).GetFiles("*.prefab", SearchOption.TopDirectoryOnly);
|
| | | foreach (var file in allFiles)
|
| | | {
|
| | | var importerPath = godWeaponAssetRelativePath + Path.DirectorySeparatorChar + file.Name;
|
| | | var importer = AssetImporter.GetAtPath(importerPath);
|
| | | importer.assetBundleName = "ui/godweapon";
|
| | | EditorUtility.SetDirty(importer);
|
| | | }
|
| | |
|
| | | allFiles = new DirectoryInfo(treasureRootPath).GetFiles("*.prefab", SearchOption.AllDirectories);
|
| | | foreach (var file in allFiles)
|
| | | {
|
| | | var pathStringArray = file.DirectoryName.Split(Path.DirectorySeparatorChar);
|
| | | var importerPath = treasureAssetRelativePath + Path.DirectorySeparatorChar + pathStringArray[pathStringArray.Length - 1] + Path.DirectorySeparatorChar + file.Name;
|
| | | var importer = AssetImporter.GetAtPath(importerPath);
|
| | | importer.assetBundleName = "ui/treasure/" + pathStringArray[pathStringArray.Length - 1].ToLower();
|
| | | EditorUtility.SetDirty(importer);
|
| | | }
|
| | |
|
| | | AssetDatabase.SaveAssets();
|
| | | AssetDatabase.Refresh();
|
| | | }
|
| | |
|
| | |
|
| | | }
|
| | |
|
| | | public class UpdateEffectPrefabSetting
|
| | |
| | | {
|
| | | static string rootPath = Application.dataPath + "/ResourcesOut/Mob";
|
| | | static string assetPath = "Assets/ResourcesOut/Mob";
|
| | | static string createroleRoot = Application.dataPath + "/ResourcesOut/Mob/CreateRole";
|
| | | static string createroleAssetPath = "Assets/ResourcesOut/Mob/CreateRole";
|
| | |
|
| | | static string zsMaterialPath_Origin = Application.dataPath + "/Art/Role/A_Zs/Materials";
|
| | | static string fsMaterialPath_Origin = Application.dataPath + "/Art/Role/A_Fs/Materials";
|
| | |
|
| | |
| | | .Replace("Prefab_Hand", "");
|
| | |
|
| | | importer.assetBundleName = StringUtility.Contact("mob/prefab_race", hostfix);
|
| | | EditorUtility.SetDirty(importer);
|
| | | }
|
| | |
|
| | | allFiles = new DirectoryInfo(createroleRoot).GetFiles("*.prefab", SearchOption.TopDirectoryOnly);
|
| | | foreach (var file in allFiles)
|
| | | {
|
| | | var importerPath = createroleAssetPath + Path.DirectorySeparatorChar + file.Name;
|
| | | var extersion = Path.GetExtension(file.FullName);
|
| | | var importer = AssetImporter.GetAtPath(importerPath);
|
| | | importer.assetBundleName = "mob/createrole";
|
| | | EditorUtility.SetDirty(importer);
|
| | | }
|
| | |
|
| | |
| | | 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" };
|
| | | "SoCameraSFX", "SoFlyObject", "SoSkill", "SoSweepHit", "SoGhostShadow", "SoNewBieGuide", "SoMapObjectGenerate","SoDemonDungeon",
|
| | | "SoHazyMapNpc"};
|
| | |
|
| | | [MenuItem("程序/设置资源包名/更新ScriptableObject(All) AssetBundleName")]
|
| | | public static void SetAllScriptableObjectAssetBundleName()
|
| | |
| | |
|
| | | if (File.Exists(from))
|
| | | {
|
| | | if (!File.Exists(to))
|
| | | if (File.Exists(to))
|
| | | {
|
| | | File.Delete(to);
|
| | | }
|
| | | File.Move(from, to);
|
| | | File.Copy(from, to);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | EditorUtility.SetDirty(importer);
|
| | | }
|
| | |
|
| | | var createRoleAssets = AssetDatabase.FindAssets("t:prefab", new string[] { "Assets/ResourcesOut/Scene/CreateRole" });
|
| | | foreach (var item in createRoleAssets)
|
| | | {
|
| | | var importer = AssetImporter.GetAtPath(AssetDatabase.GUIDToAssetPath(item));
|
| | | importer.assetBundleName = "maps/createrole";
|
| | | EditorUtility.SetDirty(importer);
|
| | | }
|
| | |
|
| | | var textures = AssetDatabase.FindAssets("t:Texture2D", new string[] { "Assets/ResourcesOut/Scene/Textures" });
|
| | | foreach (var item in textures)
|
| | | {
|
| | | var importer = AssetImporter.GetAtPath(AssetDatabase.GUIDToAssetPath(item));
|
| | | importer.assetBundleName = "maps/textures";
|
| | | EditorUtility.SetDirty(importer);
|
| | | }
|
| | |
|
| | | AssetDatabase.SaveAssets();
|
| | | AssetDatabase.Refresh();
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | public class UpdateAudioSetting
|