| | |
| | |
|
| | | public class UpdateUIPrefabSetting
|
| | | {
|
| | | static string prefabRootPath = Application.dataPath + "/ResourcesOut/Prefab";
|
| | | static string prefabAssetRelativePath = "Assets/ResourcesOut/Prefab";
|
| | | static string prefabRootPath = Application.dataPath + "/ResourcesOut/UIComp";
|
| | | static string prefabAssetRelativePath = "Assets/ResourcesOut/UIComp";
|
| | |
|
| | |
|
| | | [MenuItem("程序/设置资源包名/更新Prefab(All) AssetBundleName")]
|
| | |
| | | {
|
| | | var importerPath = prefabAssetRelativePath + Path.DirectorySeparatorChar + file.Name;
|
| | | var importer = AssetImporter.GetAtPath(importerPath);
|
| | | importer.assetBundleName = "prefab";
|
| | | importer.assetBundleName = "uicomp";
|
| | | // EditorUtility.SetDirty(importer);
|
| | | }
|
| | |
|
| | |
|
| | | Debug.Log("Prefab资源包名更新完成!");
|
| | | Debug.Log("UIComp资源包名更新完成!");
|
| | | // AssetDatabase.SaveAssets();
|
| | | // AssetDatabase.Refresh();
|
| | | }
|
| | |
| | | if (extension == ".meta")
|
| | | {
|
| | | continue;
|
| | | } |
| | | |
| | | }
|
| | |
|
| | | if (extension == ".DS_Store")
|
| | | {
|
| | | continue;
|