Search Results for

    Show / Hide Table of Contents

    Class GameSettings

    The main game engine configuration service. Loads and applies game configuration.

    Inheritance
    System.Object
    SettingsBase
    GameSettings
    Namespace: FlaxEditor.Content.Settings
    Assembly: FlaxEngine.CSharp.dll
    Syntax
    public sealed class GameSettings : SettingsBase

    Constructors

    GameSettings()

    Initializes a new instance of the GameSettings.

    Declaration
    public GameSettings()

    Fields

    AndroidPlatform

    Reference to AndroidPlatformSettings asset. Used to apply configuration on Android platform.

    Declaration
    [EditorOrder(2060)]
    [EditorDisplay("Platform Settings", "Android")]
    [AssetReference]
    [Tooltip("Reference to Android Platform Settings asset")]
    public JsonAsset AndroidPlatform
    Field Value
    JsonAsset

    Audio

    Reference to AudioSettings asset.

    Declaration
    [EditorOrder(1015)]
    [EditorDisplay("Other Settings", null)]
    [AssetReference]
    [Tooltip("Reference to Audio Settings asset")]
    public JsonAsset Audio
    Field Value
    JsonAsset

    CompanyName

    The company full name.

    Declaration
    [EditorOrder(10)]
    [EditorDisplay("General", null)]
    public string CompanyName
    Field Value
    System.String

    CopyrightNotice

    The copyright note used for content signing (eg. source code header).

    Declaration
    [EditorOrder(15)]
    [EditorDisplay("General", null)]
    public string CopyrightNotice
    Field Value
    System.String

    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.Collections.Generic.Dictionary<System.String, JsonAsset>

    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
    SceneReference

    GameCooking

    Reference to BuildSettings asset.

    Declaration
    [EditorOrder(1050)]
    [EditorDisplay("Other Settings", null)]
    [AssetReference]
    [Tooltip("Reference to Build Settings asset")]
    public JsonAsset GameCooking
    Field Value
    JsonAsset

    Graphics

    Reference to GraphicsSettings asset.

    Declaration
    [EditorOrder(1040)]
    [EditorDisplay("Other Settings", null)]
    [AssetReference]
    [Tooltip("Reference to Graphics Settings asset")]
    public JsonAsset Graphics
    Field Value
    JsonAsset

    Icon

    The default application icon.

    Declaration
    [EditorOrder(30)]
    [EditorDisplay("General", null)]
    [Tooltip("The default icon of the application.")]
    public Texture Icon
    Field Value
    Texture

    Input

    Reference to InputSettings asset.

    Declaration
    [EditorOrder(1035)]
    [EditorDisplay("Other Settings", null)]
    [AssetReference]
    [Tooltip("Reference to Input Settings asset")]
    public JsonAsset Input
    Field Value
    JsonAsset

    iOSPlatform

    Reference to iOSPlatformSettings asset. Used to apply configuration on iOS platform.

    Declaration
    [EditorOrder(2100)]
    [EditorDisplay("Platform Settings", "iOS")]
    [AssetReference]
    [Tooltip("Reference to iOS Platform Settings asset")]
    public JsonAsset iOSPlatform
    Field Value
    JsonAsset

    LayersAndTags

    Reference to LayersAndTagsSettings asset.

    Declaration
    [EditorOrder(1020)]
    [EditorDisplay("Other Settings", null)]
    [AssetReference]
    [Tooltip("Reference to Layers & Tags Settings asset")]
    public JsonAsset LayersAndTags
    Field Value
    JsonAsset

    LinuxPlatform

    Reference to LinuxPlatformSettings asset. Used to apply configuration on Linux platform.

    Declaration
    [EditorOrder(2030)]
    [EditorDisplay("Platform Settings", "Linux")]
    [AssetReference]
    [Tooltip("Reference to Linux Platform Settings asset")]
    public JsonAsset LinuxPlatform
    Field Value
    JsonAsset

    Localization

    Reference to LocalizationSettings asset.

    Declaration
    [EditorOrder(1046)]
    [EditorDisplay("Other Settings", null)]
    [AssetReference]
    [Tooltip("Reference to Localization Settings asset")]
    public JsonAsset Localization
    Field Value
    JsonAsset

    MacPlatform

    Reference to MacPlatformSettings asset. Used to apply configuration on Mac platform.

    Declaration
    [EditorOrder(2090)]
    [EditorDisplay("Platform Settings", "Mac")]
    [AssetReference]
    [Tooltip("Reference to Mac Platform Settings asset")]
    public JsonAsset MacPlatform
    Field Value
    JsonAsset

    Navigation

    Reference to NavigationSettings asset.

    Declaration
    [EditorOrder(1045)]
    [EditorDisplay("Other Settings", null)]
    [AssetReference]
    [Tooltip("Reference to Navigation Settings asset")]
    public JsonAsset Navigation
    Field Value
    JsonAsset

    Network

    Reference to NetworkSettings asset.

    Declaration
    [EditorOrder(1043)]
    [EditorDisplay("Other Settings", null)]
    [AssetReference]
    [Tooltip("Reference to Network Settings asset")]
    public JsonAsset Network
    Field Value
    JsonAsset

    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.Boolean

    Physics

    Reference to PhysicsSettings asset.

    Declaration
    [EditorOrder(1030)]
    [EditorDisplay("Other Settings", null)]
    [AssetReference]
    [Tooltip("Reference to Physics Settings asset")]
    public JsonAsset Physics
    Field Value
    JsonAsset

    ProductName

    The product full name.

    Declaration
    [EditorOrder(0)]
    [EditorDisplay("General", null)]
    public string ProductName
    Field Value
    System.String

    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
    JsonAsset

    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
    JsonAsset

    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
    Texture

    Streaming

    Reference to StreamingSettings asset.

    Declaration
    [EditorOrder(1060)]
    [EditorDisplay("Other Settings", null)]
    [AssetReference]
    [Tooltip("Reference to Streaming Settings asset")]
    public JsonAsset Streaming
    Field Value
    JsonAsset

    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
    JsonAsset

    Time

    Reference to TimeSettings asset.

    Declaration
    [EditorOrder(1010)]
    [EditorDisplay("Other Settings", null)]
    [AssetReference]
    [Tooltip("Reference to Time Settings asset")]
    public JsonAsset Time
    Field Value
    JsonAsset

    UWPPlatform

    Reference to UWPPlatformSettings asset. Used to apply configuration on Universal Windows Platform.

    Declaration
    [EditorOrder(2020)]
    [EditorDisplay("Platform Settings", "Universal Windows Platform")]
    [AssetReference]
    [Tooltip("Reference to Universal Windows Platform Settings asset")]
    public JsonAsset UWPPlatform
    Field Value
    JsonAsset

    WindowsPlatform

    Reference to WindowsPlatformSettings asset. Used to apply configuration on Windows platform.

    Declaration
    [EditorOrder(2010)]
    [EditorDisplay("Platform Settings", "Windows")]
    [AssetReference]
    [Tooltip("Reference to Windows Platform Settings asset")]
    public JsonAsset WindowsPlatform
    Field Value
    JsonAsset

    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
    JsonAsset

    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
    JsonAsset

    Properties

    GameSettingsAssetPath

    Gets the absolute path to the game settings asset file.

    Declaration
    public static string GameSettingsAssetPath { get; }
    Property Value
    System.String

    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
    GameSettings

    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. TimeSettings).

    Remarks

    Supports loading game settings, any sub settings container (e.g. PhysicsSettings) and custom settings (see CustomSettings).

    LoadAsset()

    Loads the game settings asset.

    Declaration
    public static JsonAsset LoadAsset()
    Returns
    JsonAsset

    The loaded game settings asset.

    LoadAsset(Type)

    Loads the settings asset of the given type.

    Declaration
    public static JsonAsset LoadAsset(Type type)
    Parameters
    System.Type type

    The game settings type (e.g. TimeSettings).

    Returns
    JsonAsset

    Loaded settings asset or null if fails.

    Remarks

    Supports loading game settings, any sub settings container (e.g. PhysicsSettings) and custom settings (see CustomSettings).

    LoadAsset<T>()

    Loads the settings asset of the given type.

    Declaration
    public static JsonAsset LoadAsset<T>()
        where T : SettingsBase
    Returns
    JsonAsset

    Loaded settings asset or null if fails.

    Type Parameters
    T

    The game settings type (e.g. TimeSettings).

    Remarks

    Supports loading game settings, any sub settings container (e.g. PhysicsSettings) and custom settings (see CustomSettings).

    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.Boolean

    True if failed otherwise false.

    Type Parameters
    T

    The game settings type (e.g. TimeSettings).

    Remarks

    Supports saving game settings, any sub settings container (e.g. PhysicsSettings).

    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.String key

    The custom key (must be unique per context).

    JsonAsset customSettingsAsset

    The custom settings asset.

    Returns
    System.Boolean

    True if failed otherwise false.

    Extension Methods

    Extensions.ReflectiveCompare<T>(T, T)
    Extensions.DeepClone<T>(T)
    Extensions.RawClone<T>(T)
    In This Article
    • Constructors
      • GameSettings()
    • Fields
      • AndroidPlatform
      • Audio
      • CompanyName
      • CopyrightNotice
      • CustomSettings
      • FirstScene
      • GameCooking
      • Graphics
      • Icon
      • Input
      • iOSPlatform
      • LayersAndTags
      • LinuxPlatform
      • Localization
      • MacPlatform
      • Navigation
      • Network
      • NoSplashScreen
      • Physics
      • ProductName
      • PS4Platform
      • PS5Platform
      • SplashScreen
      • Streaming
      • SwitchPlatform
      • Time
      • UWPPlatform
      • WindowsPlatform
      • XboxOnePlatform
      • XboxScarlettPlatform
    • Properties
      • GameSettingsAssetPath
    • Methods
      • Apply()
      • Load()
      • Load<T>()
      • LoadAsset()
      • LoadAsset(Type)
      • LoadAsset<T>()
      • Save<T>(T)
      • SetCustomSettings(String, JsonAsset)
    • Extension Methods
    Back to top Copyright © 2012-2024 Wojciech Figat