3 protected Widget m_Root;
6 protected bool m_bShowInEditor;
9 protected void OnEditorOpen()
11 m_Root.SetVisible(m_bShowInEditor);
15 protected void OnEditorClosed()
17 m_Root.SetVisible(!m_bShowInEditor);
21 override void HandlerAttached(Widget w)
26 if (!editorManagerEntity)
29 editorManagerEntity.GetOnOpened().Insert(OnEditorOpen);
30 editorManagerEntity.GetOnClosed().Insert(OnEditorClosed);
32 m_Root.SetVisible(m_bShowInEditor == editorManagerEntity.IsOpened());
36 override void HandlerDeattached(Widget w)
40 if (!editorManagerEntity)
43 editorManagerEntity.GetOnOpened().Remove(OnEditorOpen);
44 editorManagerEntity.GetOnClosed().Remove(OnEditorClosed);