public static IPanel CreateRuntimePanel(ScriptableObject ownerObject) { var panel = new RuntimePanel(ownerObject, s_RuntimeDispatcher) { IMGUIEventInterests = new EventInterests { wantsMouseMove = true, wantsMouseEnterLeaveWindow = true } }; return(panel); }
public static IPanel FindOrCreateRuntimePanel(ScriptableObject ownerObject) { Panel panel; if (!UIElementsUtility.TryGetPanel(ownerObject.GetInstanceID(), out panel)) { panel = new RuntimePanel(ownerObject, s_RuntimeDispatcher) { IMGUIEventInterests = new EventInterests { wantsMouseMove = true, wantsMouseEnterLeaveWindow = true } }; RegisterCachedPanelInternal(ownerObject.GetInstanceID(), panel); } else { Debug.Assert(ContextType.Player == panel.contextType, "Panel is not a runtime panel."); } return panel; }