public static void RebuildAllUIAtlas() { int startPos = GPathStaticAPI.ProjectPath.Length; string[] files = Directory.GetFiles(Application.dataPath, "*.fnt", SearchOption.AllDirectories); if (files != null && files.Length > 0) { for (int i = 0, length = files.Length; i < length; i++) { GEditorTexturePackerImporter.DoRebuildNGUIAtlas(files[i].Substring(startPos)); } } }
public static bool CheckRebuildUIAtlas() { if (EditorApplication.isPlaying) { return(false); } TextAsset selected = Selection.activeObject as TextAsset; if (selected == null) { return(false); } return(GEditorTexturePackerImporter.IsAtlasConfig(AssetDatabase.GetAssetPath(selected))); }
private static StringBuilder GetImageName(string[] fileName, ref StringBuilder sb) { if (fileName != null && fileName.Length > 0) { for (int j = 0; j < fileName.Length; j++) { if (GEditorTexturePackerImporter.IsTextureFile(fileName[j])) { if (!RegexUtility.IsHasCHZN(Path.GetFileName(fileName[j]))) { sb.Append(fileName[j]); sb.Append(" "); } } } } return(sb); }
public static void RebuildUIAtlas() { TextAsset selected = Selection.activeObject as TextAsset; GEditorTexturePackerImporter.DoRebuildNGUIAtlas(AssetDatabase.GetAssetPath(selected)); }