mirror of
https://github.com/tuyoogame/YooAsset.git
synced 2026-05-14 19:40:47 +00:00
update extension sample
PanelMonitor增加控制开关
This commit is contained in:
@@ -6,6 +6,11 @@ using UnityEngine.U2D;
|
||||
|
||||
public static class UIPanelSettings
|
||||
{
|
||||
/// <summary>
|
||||
/// 是否开启面板监测
|
||||
/// </summary>
|
||||
public static bool EnablePanelMonitor = false;
|
||||
|
||||
/// <summary>
|
||||
/// 面板文件夹GUID
|
||||
/// </summary>
|
||||
@@ -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
|
||||
/// <summary>
|
||||
/// 刷新面板清单
|
||||
/// </summary>
|
||||
public static void RefreshPanelManifest(PanelManifest manifest)
|
||||
private static void RefreshPanelManifest(PanelManifest manifest)
|
||||
{
|
||||
manifest.ReferencesAtlas.Clear();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user