public FullscreenOption(EditorFullscreenSettings settings, KeyCode hotkey, EventModifiers modifiers, OpenFullscreenAtPosition openAtPosition, bool showToolbarByDefault, Vector2 position, string optionLabel, Type windowType, bool addToOptionsDict, bool isGameView) { this.hotkey = hotkey; this.modifiers = modifiers; this.openAtPosition = openAtPosition; this.showToolbarByDefault = showToolbarByDefault; this.position = position; this.optionLabel = optionLabel; this.windowTypeAssemblyQualifiedName = windowType == null ? null : windowType.AssemblyQualifiedName; this.isGameView = isGameView; gameViewOptions = isGameView ? new GameViewOptions() : null; AssignOptionID(settings, addToOptionsDict); }
/// <summary> /// Sets the game view settings at runtime. /// </summary> /// <param name="newOption">enable or disable</param> public void SetGameView(GameViewOptions newOption) { RenderGameView = newOption; List <XRDisplaySubsystem> xrDisplayList = new List <XRDisplaySubsystem>(); SubsystemManager.GetInstances(xrDisplayList); if (xrDisplayList.Count == 1) { XRDisplaySubsystem display = xrDisplayList[0]; // This line turns off rendering to the default game view. display.disableLegacyRenderer = (newOption == GameViewOptions.Disable); } }