logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class UnityGameSettingsDefinition

    Unity ScriptableObject-based game settings definition.
    Provides a Unity-specific implementation of IGameSettingsDefinition for creating configurable game settings assets. Supports various value types, validation ranges, character limits, and storage configuration for persistent settings.

    Inheritance
    object
    UnityGameSettingsDefinition
    UnityAudioGameSettingsDefinition
    UnityGraphicGameSettingsDefinition
    UnityLocalizationGameSettingsDefinition
    UnityUIGameSettingsDefinition
    Implements
    IGameSettingsDefinition
    IFoundationSettings
    Namespace: Serenity.GameSettings.Installation.Settings
    Assembly: Serenity.UnityGlobal.Infrastructure.dll
    Syntax
    public class UnityGameSettingsDefinition : ScriptableObject, IGameSettingsDefinition, IFoundationSettings

    Constructors

    UnityGameSettingsDefinition()

    Declaration
    public UnityGameSettingsDefinition()

    Fields

    AvoidResetToDefault

    Declaration
    public bool AvoidResetToDefault
    Field Value
    Type Description
    bool

    Whether this setting should be excluded from reset to default operations.
    When true, the setting keeps its current value when ResetGameSettingsToDefault is triggered.

    CharacterLimit

    Declaration
    public int CharacterLimit
    Field Value
    Type Description
    int

    Maximum character length for String type values.
    Enforced during input validation and serialization.

    DefaultValue

    Declaration
    public string DefaultValue
    Field Value
    Type Description
    string

    Default value for this setting when no saved value exists.
    Format depends on ValueType (e.g., "true"/"false" for bool, numeric strings for int/float).

    Guid

    Declaration
    public string Guid
    Field Value
    Type Description
    string

    Global unique identifier (GUID) for this settings definition asset.
    Used for asset referencing and tracking across the project.

    Id

    Declaration
    public string Id
    Field Value
    Type Description
    string

    Unique identifier for this game setting. Used as a key to retrieve and store values.

    IsStoreable

    Declaration
    public bool IsStoreable
    Field Value
    Type Description
    bool

    Whether this setting should be persisted to storage.
    When false, the setting exists only in memory during runtime.

    IsTranslatingValue

    Declaration
    public bool IsTranslatingValue
    Field Value
    Type Description
    bool

    Whether this setting's value is being translated.

    MaximumValue

    Declaration
    public string MaximumValue
    Field Value
    Type Description
    string

    Maximum allowed value for numeric types (Int, Float).
    Ignored for Bool, String, and Selectable types.

    MinimumValue

    Declaration
    public string MinimumValue
    Field Value
    Type Description
    string

    Minimum allowed value for numeric types (Int, Float).
    Ignored for Bool, String, and Selectable types.

    Options

    Declaration
    public ConfigurationEntry[] Options
    Field Value
    Type Description
    ConfigurationEntry[]

    Key-value pairs that define the available options for this setting.
    Used for dropdown selections and validation of allowed values.

    ValueType

    Declaration
    public GameSettingsValueType ValueType
    Field Value
    Type Description
    GameSettingsValueType

    Defines the data type of this game setting (Bool, Int, Float, String, or Selectable).
    Determines which UI controls and validation rules are applied.

    selectableObjectValues

    Declaration
    public Object[] selectableObjectValues
    Field Value
    Type Description
    Object[]

    Array of Unity Objects that represent available selectable values.
    Hidden in inspector as it's managed programmatically based on selectableValueTypeName.

    selectableValueTypeName

    Declaration
    public string selectableValueTypeName
    Field Value
    Type Description
    string

    Serialized type name for selectable value types when ValueType is Selectable.
    Stores the fully qualified name of the Unity Object type that can be selected.

    Implements

    IGameSettingsDefinition
    IFoundationSettings
    In this article
    © 2026 Serenity. All Rights Reserved