Skip to content

Game.Prefabs.NetSectionFlags

Assembly:
Assembly-CSharp

Namespace: Game.Prefabs

Type: enum (public, with [Flags])

Base: System.Enum

Summary:
Bitmask enum describing configurable visual and layout properties of a net (road/track) section. Each flag represents a discrete feature or visibility state (orientation, side, hidden parts, alignment, length modifier, and whether the section is above or below ground). Intended to be combined using bitwise operations.


Fields

  • Invert = 1
    Invert the section orientation (e.g. reverse left/right or direction-dependent visuals).

  • Median = 2
    Marks the section as a median strip (center divider).

  • Left = 4
    Marks the section as belonging to or rendering on the left side.

  • Right = 8
    Marks the section as belonging to or rendering on the right side.

  • Underground = 0x10 (16)
    Section is below ground (tunnel/pit) and should be treated/rendered as such.

  • Overhead = 0x20 (32)
    Section is above ground (bridge/overpass) and should be treated/rendered accordingly.

  • FlipLanes = 0x40 (64)
    Flip the lane ordering for the section (affects lane orientation/layout).

  • AlignCenter = 0x80 (128)
    Align the section to the center of the parent net rather than to a side.

  • FlipMesh = 0x100 (256)
    Flip the mesh geometry (mirror) for the section.

  • Hidden = 0x200 (512)
    Completely hide the section (no rendering).

  • HiddenSurface = 0x400 (1024)
    Hide the surface (top) geometry of the section, leaving other parts visible.

  • HiddenSide = 0x800 (2048)
    Hide side geometry of the section.

  • HiddenTop = 0x1000 (4096)
    Hide the very top portion of the section.

  • HiddenBottom = 0x2000 (8192)
    Hide the bottom portion of the section.

  • HalfLength = 0x4000 (16384)
    Treat the section as half-length (shortened) for rendering/placement.

Properties

  • None (this is a flags enum; use bitwise operations or Enum.HasFlag to query).

Constructors

  • None (enum types do not define explicit constructors; values are defined above).

Methods

  • None (no instance methods; use standard enum APIs such as Enum.HasFlag or bitwise operators).

Usage Example

// Combine flags
NetSectionFlags flags = NetSectionFlags.Left | NetSectionFlags.FlipMesh | NetSectionFlags.HiddenSurface;

// Check for a single flag
bool isHiddenSurface = flags.HasFlag(NetSectionFlags.HiddenSurface);
// or
bool isInverted = (flags & NetSectionFlags.Invert) != 0;

// Add or remove a flag
flags |= NetSectionFlags.HalfLength;       // set HalfLength
flags &= ~NetSectionFlags.HiddenSurface;   // clear HiddenSurface

// Check for any left/right flags
bool hasSide = (flags & (NetSectionFlags.Left | NetSectionFlags.Right)) != 0;