Skip to content

Game.Prefabs.PrefabComponents

Assembly:
Namespace: Game.Prefabs

Type: public enum PrefabComponents : uint

Base: System.Enum (underlying type: System.UInt32)

Summary:
An enum with the [Flags] attribute representing bit flags used by prefab objects in the Game.Prefabs namespace. Each value is a single-bit flag (uint) that can be combined using bitwise operations to represent multiple component states or attributes for a prefab. Common usage is checking, setting, or clearing these flags on prefab-related data structures.


Fields

  • Locked = 1u
    Indicates the prefab is locked. This is the least-significant bit (0x1). Typically used to mark prefabs that should not be modified or removed.

  • PlacedSignatureBuilding = 2u
    Indicates the prefab is a placed signature building. This is the next bit (0x2). Used to mark special placed building prefabs.

Properties

  • This enum defines no properties.

Constructors

  • Enums do not define explicit constructors here. The underlying enum constructor behavior is provided by System.Enum; values are created by assignment/casting.

Methods

  • No methods are declared on this enum type. Use the standard System.Enum and System.Enum/ValueType methods (ToString, HasFlag, etc.) or bitwise operators for working with the flags.

Usage Example

// Combine flags
PrefabComponents flags = PrefabComponents.Locked | PrefabComponents.PlacedSignatureBuilding;

// Check a flag
bool isLocked = flags.HasFlag(PrefabComponents.Locked);

// Clear a flag
flags &= ~PrefabComponents.Locked;

// Cast to underlying value (uint) for storage or interop
uint rawValue = (uint)flags;

// Set a single flag
flags |= PrefabComponents.Locked;

// Example conditional usage
if ((flags & PrefabComponents.PlacedSignatureBuilding) != 0)
{
    // handle signature building logic
}