Skip to content

Game.Prefabs.FixedNetFlags

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

Type: public enum FixedNetFlags (with [Flags] attribute)

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

Summary:
A bitmask enum used to describe fixed net prefab characteristics. Marked with [Flags], it is intended to allow multiple boolean characteristics to be combined in a single value. Currently this enum defines a single flag, Straight, which indicates that a net prefab represents a straight segment. Additional flags may be added in future to describe other segment properties (curved, bridge, tunnel, etc.).


Fields

  • Straight = 1u
    Represents a straight net segment. As a flag value it occupies the least-significant bit (value 1). Use bitwise operations or Enum.HasFlag to test for this characteristic.

Properties

  • None declared on this enum.
    (As an enum type, it inherits static and instance methods from System.Enum but no custom properties are defined here.)

Constructors

  • None declared.
    (Enums have implicit construction and underlying storage of the specified integral type (uint). No custom constructors are provided.)

Methods

  • None declared.
    (Only the standard System.Enum and System.ValueType methods are available; no additional methods are defined on this enum.)

Usage Example

// Checking a flag:
FixedNetFlags flags = FixedNetFlags.Straight;

if ((flags & FixedNetFlags.Straight) != 0)
{
    // handle straight-segment-specific logic
}

// Alternatively (less efficient due to boxing):
if (flags.HasFlag(FixedNetFlags.Straight))
{
    // handle straight segment
}

// Combining flags (example for future flags):
// FixedNetFlags combined = FixedNetFlags.Straight | FixedNetFlags.Curved;

// Storing/retrieving as underlying uint:
uint raw = (uint)flags;
FixedNetFlags fromRaw = (FixedNetFlags)raw;