Class GameSettings
The main game engine configuration service. Loads and applies game configuration.
Namespace: FlaxEditor.Content.Settings
Assembly: FlaxEngine.CSharp.dll
Syntax
public sealed class GameSettings : SettingsBase
Constructors
GameSettings()
Fields
AndroidPlatform
Reference to Android
Declaration
[EditorOrder(2060)]
[EditorDisplay("Platform Settings", "Android")]
[AssetReference]
[Tooltip("Reference to Android Platform Settings asset")]
public JsonAsset AndroidPlatform
Field Value
Audio
Reference to Audio
Declaration
[EditorOrder(1015)]
[EditorDisplay("Other Settings", null)]
[AssetReference]
[Tooltip("Reference to Audio Settings asset")]
public JsonAsset Audio
Field Value
CompanyName
The company full name.
Declaration
[EditorOrder(10)]
[EditorDisplay("General", null)]
public string CompanyName
Field Value
System.
|
CopyrightNotice
The copyright note used for content signing (eg. source code header).
Declaration
[EditorOrder(15)]
[EditorDisplay("General", null)]
public string CopyrightNotice
Field Value
System.
|
CustomSettings
The custom settings to use with a game. Can be specified by the user to define game-specific options and be used by the external plugins (used as key-value pair).
Declaration
[EditorOrder(1500)]
[EditorDisplay("Other Settings", null)]
[Tooltip("The custom settings to use with a game. Can be specified by the user to define game-specific options and be used by the external plugins (used as key-value pair).")]
public Dictionary<string, JsonAsset> CustomSettings
Field Value
System.
|
FirstScene
Reference to the first scene to load on a game startup.
Declaration
[EditorOrder(900)]
[EditorDisplay("Startup", null)]
[Tooltip("Reference to the first scene to load on a game startup.")]
public SceneReference FirstScene
Field Value
GameCooking
Reference to Build
Declaration
[EditorOrder(1050)]
[EditorDisplay("Other Settings", null)]
[AssetReference]
[Tooltip("Reference to Build Settings asset")]
public JsonAsset GameCooking
Field Value
Graphics
Reference to Graphics
Declaration
[EditorOrder(1040)]
[EditorDisplay("Other Settings", null)]
[AssetReference]
[Tooltip("Reference to Graphics Settings asset")]
public JsonAsset Graphics
Field Value
Icon
The default application icon.
Declaration
[EditorOrder(30)]
[EditorDisplay("General", null)]
[Tooltip("The default icon of the application.")]
public Texture Icon
Field Value
Input
Reference to Input
Declaration
[EditorOrder(1035)]
[EditorDisplay("Other Settings", null)]
[AssetReference]
[Tooltip("Reference to Input Settings asset")]
public JsonAsset Input
Field Value
iOSPlatform
Reference to i
Declaration
[EditorOrder(2100)]
[EditorDisplay("Platform Settings", "iOS")]
[AssetReference]
[Tooltip("Reference to iOS Platform Settings asset")]
public JsonAsset iOSPlatform
Field Value
LayersAndTags
Reference to Layers
Declaration
[EditorOrder(1020)]
[EditorDisplay("Other Settings", null)]
[AssetReference]
[Tooltip("Reference to Layers & Tags Settings asset")]
public JsonAsset LayersAndTags
Field Value
LinuxPlatform
Reference to Linux
Declaration
[EditorOrder(2030)]
[EditorDisplay("Platform Settings", "Linux")]
[AssetReference]
[Tooltip("Reference to Linux Platform Settings asset")]
public JsonAsset LinuxPlatform
Field Value
Localization
Reference to Localization
Declaration
[EditorOrder(1046)]
[EditorDisplay("Other Settings", null)]
[AssetReference]
[Tooltip("Reference to Localization Settings asset")]
public JsonAsset Localization
Field Value
MacPlatform
Reference to Mac
Declaration
[EditorOrder(2090)]
[EditorDisplay("Platform Settings", "Mac")]
[AssetReference]
[Tooltip("Reference to Mac Platform Settings asset")]
public JsonAsset MacPlatform
Field Value
Navigation
Network
Reference to Network
Declaration
[EditorOrder(1043)]
[EditorDisplay("Other Settings", null)]
[AssetReference]
[Tooltip("Reference to Network Settings asset")]
public JsonAsset Network
Field Value
NoSplashScreen
True if skip showing splash screen image on the game startup.
Declaration
[EditorOrder(910)]
[EditorDisplay("Startup", "No Splash Screen")]
[Tooltip("True if skip showing splash screen image on the game startup.")]
public bool NoSplashScreen
Field Value
System.
|
Physics
Reference to Physics
Declaration
[EditorOrder(1030)]
[EditorDisplay("Other Settings", null)]
[AssetReference]
[Tooltip("Reference to Physics Settings asset")]
public JsonAsset Physics
Field Value
ProductName
The product full name.
Declaration
[EditorOrder(0)]
[EditorDisplay("General", null)]
public string ProductName
Field Value
System.
|
PS4Platform
Reference to PS4 Platform Settings asset. Used to apply configuration on PS4 platform.
Declaration
[EditorOrder(2040)]
[EditorDisplay("Platform Settings", "PlayStation 4")]
[AssetReference("FlaxEditor.Content.Settings.PS4PlatformSettings", true)]
[Tooltip("Reference to PS4 Platform Settings asset")]
public JsonAsset PS4Platform
Field Value
PS5Platform
Reference to PS5 Platform Settings asset. Used to apply configuration on PS5 platform.
Declaration
[EditorOrder(2080)]
[EditorDisplay("Platform Settings", "PlayStation 5")]
[AssetReference("FlaxEditor.Content.Settings.PS5PlatformSettings", true)]
[Tooltip("Reference to PS5 Platform Settings asset")]
public JsonAsset PS5Platform
Field Value
SplashScreen
Reference to the splash screen image to show on a game startup.
Declaration
[EditorOrder(920)]
[EditorDisplay("Startup", null)]
[Tooltip("Reference to the splash screen image to show on a game startup.")]
public Texture SplashScreen
Field Value
Streaming
Reference to Streaming
Declaration
[EditorOrder(1060)]
[EditorDisplay("Other Settings", null)]
[AssetReference]
[Tooltip("Reference to Streaming Settings asset")]
public JsonAsset Streaming
Field Value
SwitchPlatform
Reference to Switch Platform Settings asset. Used to apply configuration on Switch platform.
Declaration
[EditorOrder(2070)]
[EditorDisplay("Platform Settings", "Switch")]
[AssetReference("FlaxEditor.Content.Settings.SwitchPlatformSettings", true)]
[Tooltip("Reference to Switch Platform Settings asset")]
public JsonAsset SwitchPlatform
Field Value
Time
Reference to Time
Declaration
[EditorOrder(1010)]
[EditorDisplay("Other Settings", null)]
[AssetReference]
[Tooltip("Reference to Time Settings asset")]
public JsonAsset Time
Field Value
UWPPlatform
Reference to UWPPlatform
Declaration
[EditorOrder(2020)]
[EditorDisplay("Platform Settings", "Universal Windows Platform")]
[AssetReference]
[Tooltip("Reference to Universal Windows Platform Settings asset")]
public JsonAsset UWPPlatform
Field Value
WindowsPlatform
Reference to Windows
Declaration
[EditorOrder(2010)]
[EditorDisplay("Platform Settings", "Windows")]
[AssetReference]
[Tooltip("Reference to Windows Platform Settings asset")]
public JsonAsset WindowsPlatform
Field Value
XboxOnePlatform
Reference to Xbox One Platform Settings asset. Used to apply configuration on Xbox One platform.
Declaration
[EditorOrder(2050)]
[EditorDisplay("Platform Settings", "Xbox One")]
[AssetReference("FlaxEditor.Content.Settings.XboxOnePlatformSettings", true)]
[Tooltip("Reference to Xbox One Platform Settings asset")]
public JsonAsset XboxOnePlatform
Field Value
XboxScarlettPlatform
Reference to Xbox Scarlett Platform Settings asset. Used to apply configuration on Xbox Scarlett platform.
Declaration
[EditorOrder(2050)]
[EditorDisplay("Platform Settings", "Xbox Scarlett")]
[AssetReference("FlaxEditor.Content.Settings.XboxScarlettPlatformSettings", true)]
[Tooltip("Reference to Xbox Scarlett Platform Settings asset")]
public JsonAsset XboxScarlettPlatform
Field Value
Properties
GameSettingsAssetPath
Gets the absolute path to the game settings asset file.
Declaration
public static string GameSettingsAssetPath { get; }
Property Value
System.
|
Methods
Apply()
Loads the current game settings asset and applies it to the engine runtime configuration.
Declaration
public static extern void Apply()
Load()
Loads the game settings asset.
Declaration
public static GameSettings Load()
Returns
Game The loaded game settings. |
Load<T>()
Loads the settings of the given type.
Declaration
public static T Load<T>()
where T : SettingsBase
Returns
T
Loaded settings object or null if fails. |
Type Parameters
T
The game settings type (e.g. Time |
Remarks
Supports loading game settings, any sub settings container (e.g. Physics
LoadAsset()
Loads the game settings asset.
Declaration
public static JsonAsset LoadAsset()
Returns
Json The loaded game settings asset. |
LoadAsset(Type)
Loads the settings asset of the given type.
Declaration
public static JsonAsset LoadAsset(Type type)
Parameters
System. The game settings type (e.g. Time |
Returns
Json Loaded settings asset or null if fails. |
Remarks
Supports loading game settings, any sub settings container (e.g. Physics
LoadAsset<T>()
Loads the settings asset of the given type.
Declaration
public static JsonAsset LoadAsset<T>()
where T : SettingsBase
Returns
Json Loaded settings asset or null if fails. |
Type Parameters
T
The game settings type (e.g. Time |
Remarks
Supports loading game settings, any sub settings container (e.g. Physics
Save<T>(T)
Saves the settings of the given type.
Declaration
public static bool Save<T>(T obj)
where T : SettingsBase
Parameters
T
obj
|
Returns
System. True if failed otherwise false. |
Type Parameters
T
The game settings type (e.g. Time |
Remarks
Supports saving game settings, any sub settings container (e.g. Physics
SetCustomSettings(String, JsonAsset)
Sets the custom settings (or unsets if provided asset is null).
Declaration
public static bool SetCustomSettings(string key, JsonAsset customSettingsAsset)
Parameters
System. The custom key (must be unique per context). |
Json The custom settings asset. |
Returns
System. True if failed otherwise false. |