public void OnDestroy() { if (s_Instance == this) { s_Instance = null; } }
public static void CreateOrShowExisting() { if (s_Instance == null) { s_Instance = GetWindow <InputTemplateBrowserWindow>(desiredDockNextTo: typeof(InputDebuggerWindow)); s_Instance.titleContent = new GUIContent("Input Templates"); } s_Instance.Show(); s_Instance.Focus(); }
private void DrawToolbarGUI() { EditorGUILayout.BeginHorizontal(EditorStyles.toolbar); m_ShowUnrecognizedDevices = GUILayout.Toggle(m_ShowUnrecognizedDevices, Contents.showUnrecognizedDevicesContent, EditorStyles.toolbarButton); m_ShowDisconnectedDevices = GUILayout.Toggle(m_ShowDisconnectedDevices, Contents.showDisconnectedDevicesContent, EditorStyles.toolbarButton); m_ShowDisabledActions = GUILayout.Toggle(m_ShowDisabledActions, Contents.showDisabledActionsContent, EditorStyles.toolbarButton); GUILayout.FlexibleSpace(); if (GUILayout.Button(Contents.browseTemplatesContent, EditorStyles.toolbarButton)) { InputTemplateBrowserWindow.CreateOrShowExisting(); } EditorGUILayout.EndHorizontal(); }