Skip to content

Game.Settings.SettingsUISearchHiddenAttribute

Assembly: Assembly-CSharp
Namespace: Game.Settings

Type: class

Base: System.Attribute

Summary:
Attribute used to mark settings-related types or members so they are excluded from the settings UI search. Applied to classes, structs, properties, or fields. The attribute itself does not implement any hiding logic — the settings UI must check for this attribute and omit marked items. The AttributeUsage on the type allows inheritance (Inherited = true), so derived types or overridden members can also be considered hidden by consumers that respect inheritance.


Fields

  • This attribute declares no instance or static fields.
    This type only carries metadata via the attribute instance; there are no backing fields to inspect.

Properties

  • This attribute declares no properties.
    It is a simple marker attribute with no configurable properties.

Constructors

  • public SettingsUISearchHiddenAttribute()
    Constructs a new instance of the marker attribute. This is a parameterless constructor and performs no initialization beyond creating the attribute object.

Methods

  • This attribute declares no methods.
    Behavior is consumed by other systems (e.g., the settings UI/search implementation) that reflect on members to detect the presence of this attribute.

Usage Example

// Mark a settings class so it's omitted from the settings UI search
[SettingsUISearchHidden]
public class AdvancedInternalSettings
{
    public bool debugMode;
}

// Mark a single property to hide it from search
public class SomeSettings
{
    [SettingsUISearchHidden]
    public int hiddenValue { get; set; }

    public int visibleValue { get; set; }
}

Additional notes: - Valid targets: Class, Struct, Property, Field (as declared by AttributeUsage in the source). - Consumers (the settings UI/search) must explicitly check for this attribute via reflection (e.g., MemberInfo.GetCustomAttribute) to implement the hiding behavior. - Because AttributeUsage has Inherited = true, the attribute will be seen on derived types/members by reflection that honors inheritance.