コード例 #1
0
 public void OnDestroy()
 {
     if (s_Instance == this)
     {
         s_Instance = null;
     }
 }
コード例 #2
0
        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();
        }
コード例 #3
0
 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();
 }