Skip to content

Game.Settings.SettingsUIDeveloperAttribute

Assembly: Assembly-CSharp.dll
Namespace: Game.Settings

Type: Class

Base: System.Attribute

Summary:
Marker attribute used to mark settings-related classes, structs or properties as "developer" UI elements. Intended to indicate that the annotated item should be treated as a developer-only setting (for example: shown only when a developer mode or advanced UI is enabled). The attribute allows inheritance (Inherited = true) and can be applied to classes, structs and properties.


Fields

  • This class declares no fields.
    The attribute contains no instance/state data; it functions purely as a marker.

Properties

  • This class declares no properties.

Constructors

  • public SettingsUIDeveloperAttribute()
    Default parameterless constructor. Nothing special is performed; the attribute is used only as a marker.

Methods

  • This class declares no custom methods.
    It inherits standard members from System.Attribute (such as Equals, GetHashCode, etc.) but defines no additional behavior.

Usage Example

// Apply to a settings class (attribute usage allows Class, Struct, Property)
[Game.Settings.SettingsUIDeveloper]
public class DeveloperSettings
{
    // Apply to an individual property
    [Game.Settings.SettingsUIDeveloper]
    public bool ShowDebugOverlays { get; set; }

    public int NormalSetting { get; set; } // regular setting
}

// At runtime you can detect the marker via reflection:
bool isDevClass = typeof(DeveloperSettings)
    .IsDefined(typeof(Game.Settings.SettingsUIDeveloperAttribute), inherit: true);

// Or check a property:
var prop = typeof(DeveloperSettings).GetProperty(nameof(DeveloperSettings.ShowDebugOverlays));
bool isDevProperty = prop?.IsDefined(typeof(Game.Settings.SettingsUIDeveloperAttribute), inherit: true) ?? false;

Notes: - AttributeTargets: Class | Struct | Property — the attribute can be applied to those targets. - Inherited = true — subclasses or derived types will inherit the attribute if present on a base type.