public void TryLaunch() { if (LaunchServerOnStart && !string.IsNullOrEmpty(OSVRServerPaths.Path)) { OSVRServerPaths.Launch(); } }
/// <summary> /// Drawing of the frame /// </summary> void OnGUI() { GUILayout.Label("Settings", EditorStyles.boldLabel); OSVRServerPaths.UsingWindows = EditorGUILayout.ToggleLeft("Using Windows?", OSVRServerPaths.UsingWindows); OSVRServerPaths.Path = EditorGUILayout.TextField("Path", OSVRServerPaths.Path); EditorGUILayout.TextArea(" Example: C:\\dev\\osvr-latest\\"); OSVRServerPaths.Executable = EditorGUILayout.TextField("Executable", OSVRServerPaths.Executable); EditorGUILayout.TextArea(" Example: osvr_server.exe"); OSVRServerPaths.Arguments = EditorGUILayout.TextField("Arguments", OSVRServerPaths.Arguments); EditorGUILayout.TextArea(" Example: osvr_server_config-oculusrift.json"); if (GUILayout.Button("Save & Launch")) { OSVRServerPaths.CheckPath(); OSVRServerPaths.Save(); OSVRServerPaths.Launch(); } if (GUILayout.Button("Save")) { OSVRServerPaths.CheckPath(); OSVRServerPaths.Save(); } if (GUILayout.Button("Close")) { Quit(); } }
/// <summary> /// Actual logic for saving /// </summary> public void Save() { PreSavePost(); OSVRServerPaths.CheckPath(); OSVRServerPaths.Save(); // Executed in case the paths changed in the CheckPath method PostLoadUpdate(); }
/// <summary> /// Launches the application /// </summary> public void Launch() { OSVRServerPaths.Launch(); }
/// <summary> /// Actual logic for loading /// </summary> public void Load() { OSVRServerPaths.Load(); PostLoadUpdate(); }
public static void ShowWindow() { OSVRServerPaths.Load(); GetWindow(typeof(OSVRWindowPaths)); }