Exemplo n.º 1
0
        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));
                }
            }
        }
Exemplo n.º 2
0
        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)));
        }
Exemplo n.º 3
0
 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);
 }
Exemplo n.º 4
0
        public static void RebuildUIAtlas()
        {
            TextAsset selected = Selection.activeObject as TextAsset;

            GEditorTexturePackerImporter.DoRebuildNGUIAtlas(AssetDatabase.GetAssetPath(selected));
        }