Game.Settings.DisplayMode
Assembly: Assembly-CSharp.dll
Namespace: Game.Settings
Type: public enum
Base: System.Enum
Summary:
Represents the available display/windowing modes used by the game's settings. Use this enum when reading or writing the player's preferred display mode (exclusive fullscreen, borderless fullscreen-windowed, or windowed). When applying a mode at runtime you typically map these values to the engine/OS-level fullscreen/windowed APIs (for example Unity's FullScreenMode).
Fields
-
Fullscreen
Represents exclusive fullscreen mode (true fullscreen). Typically gives the application exclusive control of the output display and may change the display resolution. May behave differently across platforms and could require reinitializing graphics resources or a restart depending on engine/hardware. -
FullscreenWindow
Represents borderless fullscreen-windowed (also called "fullscreen window" or "borderless window"). The application fills the screen but runs in a windowed context (usually more friendly to alt-tab and multi-monitor setups). -
Window
Represents standard windowed mode with borders and a resizable or fixed window. Does not take exclusive control of the display and usually does not change desktop resolution.
Properties
- This enum defines no properties. It is a plain value type with named constants.
Constructors
- Enums do not define explicit constructors in C#. The default value for the enum type is the zero-valued member (the first declared member, here
Fullscreen
unless explicit values are assigned).
Methods
- This enum defines no instance methods. Use the standard System.Enum static and extension helpers:
- Enum.Parse/Enum.TryParse to convert strings to DisplayMode.
- Enum.GetNames/Enum.GetValues to enumerate members.
- ToString() on a DisplayMode value to get its name.
Usage Example
using UnityEngine;
using Game.Settings;
public class DisplayModeApplier
{
public void Apply(DisplayMode mode)
{
switch (mode)
{
case DisplayMode.Fullscreen:
Screen.fullScreenMode = FullScreenMode.ExclusiveFullScreen;
break;
case DisplayMode.FullscreenWindow:
Screen.fullScreenMode = FullScreenMode.FullScreenWindow;
break;
case DisplayMode.Window:
Screen.fullScreenMode = FullScreenMode.Windowed;
break;
}
}
public DisplayMode ReadFromString(string s)
{
// Safe parse from a saved config string
if (Enum.TryParse<DisplayMode>(s, true, out var result))
return result;
return DisplayMode.FullscreenWindow; // fallback
}
}
Notes for modders: - Confirm mapping between this enum and engine APIs on the specific Cities: Skylines 2 build — naming and behavior may differ from Unity's FullScreenMode. - Changing display mode at runtime may trigger resolution changes or require reloading certain graphics resources; test on target platforms.