Skip to content

Game.Prefabs.NetPieceFlags

Assembly:
Assembly-CSharp (game assembly)

Namespace:
Game.Prefabs

Type:
public enum NetPieceFlags

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

Summary:
Bit flags describing characteristics and behaviors of network (net) piece prefabs used by the game (roads, rails, sidewalks, etc.). The enum is marked with [Flags], so values can be combined with bitwise operations to express multiple traits at once. Descriptions below are inferred from the flag names and common use in net/prefab handling; test behavior in-game for exact effects.


Fields

  • PreserveShape = 1
    Preserve the original shape of the piece (do not reshape when placing or when adjacent pieces change).

  • BlockTraffic = 2
    Block vehicle traffic on/through this piece (used for barriers or non-drivable mesh parts).

  • BlockCrosswalk = 4
    Block pedestrian crosswalks or prevent crosswalk placement/usage at this piece.

  • Surface = 8
    Indicates this piece is a surface element (e.g., road surface or ground-facing piece).

  • DisableTiling = 0x10
    Disable automatic texture/material tiling for this piece (keep material un-tiled or use unique UVs).

  • LowerBottomToTerrain = 0x20
    Lower the bottom geometry of the piece to match terrain height.

  • AsymmetricMeshX = 0x40
    Mesh is asymmetric along the X axis (affects mirroring or placement behavior on X).

  • AsymmetricMeshZ = 0x80
    Mesh is asymmetric along the Z axis (affects mirroring or placement behavior on Z).

  • HasMesh = 0x100
    Piece has a mesh (renderable geometry). Useful to quickly test whether rendering or collision meshes exist.

  • Side = 0x200
    Marks the piece as a side element (e.g., shoulder, curb, or side decoration).

  • RaiseTopToTerrain = 0x400
    Raise the top geometry of the piece to match terrain height.

  • SmoothTopNormal = 0x800
    Smooth normals on the top surface for lighting (reduce hard shading artifacts).

  • SkipBottomHalf = 0x1000
    Skip rendering or processing of the bottom half of the mesh (optimization or visual choice).

  • Top = 0x2000
    Marks the piece as a top element.

  • Bottom = 0x4000
    Marks the piece as a bottom element.

Properties

  • None (this is a simple [Flags] enum; use bitwise operations or Enum.HasFlag to query).

Constructors

  • None (enum types have implicit construction behavior).
    Note: The default enum value (0) means "no flags set"; there is no explicit "None" member defined in this enum.

Methods

  • None declared on the enum type. Use standard enum/bitwise operations and System.Enum helpers.

Usage Example

// Combine flags when creating or configuring a piece
NetPieceFlags flags = NetPieceFlags.Surface | NetPieceFlags.HasMesh | NetPieceFlags.SmoothTopNormal;

// Check flags
bool hasMesh = (flags & NetPieceFlags.HasMesh) != 0;
// or
bool isSurface = flags.HasFlag(NetPieceFlags.Surface);

// Add or remove a flag
flags |= NetPieceFlags.DisableTiling;      // add
flags &= ~NetPieceFlags.DisableTiling;     // remove

{{ These flags control rendering/placement and terrain-fitting behavior of net pieces. Because the exact in-game effects can depend on other prefab settings and code paths, verify changes in a test environment. }}