private void DisplayViveAppPathSettings() { UnityGUI.Space(); var buttonGui = new GUIOptions { style = EditorStyles.miniButton, maxWidth = 145 }; if (UnityGUI.Button("Set Vive application paths", buttonGui)) { var yes = EditorUtility.DisplayDialog("LNE - Message", "Do you use the HTC Connection Utility?", "Yes", "No"); if (yes) { EditorUtility.DisplayDialog("LNE - Message", "Locate the HTC Connection Utility.", "Ok"); Settings.WirelessPath = EditorUtility.OpenFilePanel("Locate the HTC Connection Utility", Settings.WirelessPath, "exe"); } EditorUtility.DisplayDialog("LNE - Message", "Locate Steam.", "Ok"); Settings.SteamPath = EditorUtility.OpenFilePanel("Locate Steam", Settings.SteamPath, "exe"); EditorUtility.DisplayDialog("LNE - Message", "Locate Steam VR.", "Ok"); Settings.SteamVRPath = EditorUtility.OpenFilePanel("Locate Steam VR", Settings.SteamVRPath, "url"); yes = EditorUtility.DisplayDialog("LNE - Message", "Do you use the SRanipal runtime?", "Yes", "No"); if (yes) { EditorUtility.DisplayDialog("LNE - Message", "Locate the SRanipal runtime.", "Ok"); Settings.SRanipalPath = EditorUtility.OpenFilePanel("Locate SRanipal runtime", Settings.SRanipalPath, "lnk"); } } var labelGui = new GUIOptions { style = EditorStyles.label, textColour = new Color(.2f, .2f, .2f), textSize = 10 }; UnityGUI.IndentLevel--; UnityGUI.Label(Settings.WirelessPath != "" ? Settings.WirelessPath : "<not set>", labelGui); UnityGUI.Label(Settings.SteamPath != "" ? Settings.SteamPath : "<not set>", labelGui); UnityGUI.Label(Settings.SteamVRPath != "" ? Settings.SteamVRPath : "<not set>", labelGui); UnityGUI.Label(Settings.SRanipalPath != "" ? Settings.SRanipalPath : "<not set>", labelGui); UnityGUI.IndentLevel++; }
private void DisplayDelaySettings() { var floatGui = new GUIOptions { style = EditorStyles.numberField, width = 185 }; UnityGUI.BeginHorizontal(); Settings.DelayPlay = UnityGUI.Float("Delay", Settings.DelayPlay, floatGui); if (UnityGUI.OnMouseHoverPrevious()) { helpMessage = "Delay play for some seconds after clicking the play button. Useful when testing in VR."; } UnityGUI.Label("seconds"); UnityGUI.EndHorizontal(); }
protected bool Foldout(string customLabel, SerializedProperty property, string[] path, GUIOptions options = null) { return(Foldout(customLabel, FindProperty(property, path), options)); }
protected bool Foldout(string customLabel, SerializedProperty property, GUIOptions options = null) { property.boolValue = UnityGUI.Foldout(property.boolValue, customLabel, options); return(property.boolValue); }