public static void RebuildAllFont() { 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++) { GEditorBitmapFontImporter.DoImportBitmapFont(files[i].Substring(startPos)); } } }
public static bool CheckRebuildFont() { if (EditorApplication.isPlaying) { return(false); } TextAsset selected = Selection.activeObject as TextAsset; if (selected == null) { return(false); } return(GEditorBitmapFontImporter.IsFnt(AssetDatabase.GetAssetPath(selected))); }
public static void RebuildBitmapFont() { TextAsset selected = Selection.activeObject as TextAsset; GEditorBitmapFontImporter.DoImportBitmapFont(AssetDatabase.GetAssetPath(selected)); }