diff --git a/Assets/YooAsset/Samples~/Extension Sample/Runtime/PanelMonitor/PanelMonitor.cs b/Assets/YooAsset/Samples~/Extension Sample/Runtime/PanelMonitor/PanelMonitor.cs index 54369833..3debbf39 100644 --- a/Assets/YooAsset/Samples~/Extension Sample/Runtime/PanelMonitor/PanelMonitor.cs +++ b/Assets/YooAsset/Samples~/Extension Sample/Runtime/PanelMonitor/PanelMonitor.cs @@ -6,6 +6,11 @@ using UnityEngine.U2D; public static class UIPanelSettings { + /// + /// 是否开启面板监测 + /// + public static bool EnablePanelMonitor = false; + /// /// 面板文件夹GUID /// @@ -60,6 +65,9 @@ public class UIPanelMonitor : UnityEditor.Editor static void OnPrefabSaving(GameObject go) { + if (UIPanelSettings.EnablePanelMonitor == false) + return; + UnityEditor.SceneManagement.PrefabStage stage = UnityEditor.SceneManagement.PrefabStageUtility.GetCurrentPrefabStage(); if (stage != null) { @@ -78,7 +86,7 @@ public class UIPanelMonitor : UnityEditor.Editor /// /// 刷新面板清单 /// - public static void RefreshPanelManifest(PanelManifest manifest) + private static void RefreshPanelManifest(PanelManifest manifest) { manifest.ReferencesAtlas.Clear();