From 21d50350232deb2c1c07a766f589988ae0cc3f5d Mon Sep 17 00:00:00 2001 From: litefeel Date: Wed, 14 Mar 2018 15:00:27 +0800 Subject: [PATCH] Disabled Rebuild on play mode --- Assets/BitmapFontImporter/Editor/BFMenuTool.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Assets/BitmapFontImporter/Editor/BFMenuTool.cs b/Assets/BitmapFontImporter/Editor/BFMenuTool.cs index 2302411..6cdc052 100644 --- a/Assets/BitmapFontImporter/Editor/BFMenuTool.cs +++ b/Assets/BitmapFontImporter/Editor/BFMenuTool.cs @@ -10,6 +10,8 @@ public class BFMenuTool [MenuItem("Assets/Bitmap Font/Rebuild Bitmap Font", true)] public static bool CheckRebuildFont() { + if (EditorApplication.isPlaying) return false; + TextAsset selected = Selection.activeObject as TextAsset; if (selected == null) return false; return BFImporter.IsFnt(AssetDatabase.GetAssetPath(selected)); @@ -22,6 +24,11 @@ public static void RebuildFont() BFImporter.DoImportBitmapFont(AssetDatabase.GetAssetPath(selected)); } + [MenuItem("Assets/Bitmap Font/Rebuild All Bitmap Font", true)] + public static bool CheckRebuildAllFont() + { + return !EditorApplication.isPlaying; + } [MenuItem("Assets/Bitmap Font/Rebuild All Bitmap Font")] public static void RebuildAllFont()