Game.Prefabs.SecondaryNetLaneFlags
Assembly:
Assembly-CSharp.dll
Namespace:
Game.Prefabs
Type:
enum
Base:
System.Enum (underlying type: System.Int32)
Summary:
Defines bit flags that describe secondary lane characteristics and requirements for network prefabs (road/track lanes) used by the game. Each flag represents a single bit that can be combined with others to express lane orientation, behavior requirements, or special cases used by prefab selection and lane handling logic.
Fields
-
Left = 1
Indicates the lane is on the left side (relative to a reference orientation). -
Right = 2
Indicates the lane is on the right side. -
OneSided = 4
Marks a lane configuration that exists on only one side (not mirrored). -
RequireSafe = 8
Specifies that a "safe" lane type/feature is required (e.g., protected lane for certain traffic types). -
CanFlipSides = 0x10
(16)
Allows the lane to be flipped to the opposite side when matching/placing prefabs. -
RequireParallel = 0x20
(32)
Requires the lane to run parallel to another lane/element (used for matching compatible configurations). -
RequireOpposite = 0x40
(64)
Requires an opposite-side counterpart lane (e.g., paired lanes). -
RequireSingle = 0x80
(128)
Requires the lane to be a single (not duplicated) instance. -
RequireMultiple = 0x100
(256)
Requires multiple lanes of this type (duplicate or repeated lanes). -
RequireAllowPassing = 0x200
(512)
Specifies that passing (overtaking) must be allowed for this lane. -
RequireForbidPassing = 0x400
(1024)
Specifies that passing must be forbidden for this lane. -
RequireMerge = 0x800
(2048)
Indicates the lane is intended to merge (merge behavior required). -
RequireContinue = 0x1000
(4096)
Indicates lanes must continue (no termination at this point). -
RequireStop = 0x2000
(8192)
Indicates the lane requires a stop (e.g., for intersections or stops). -
Crossing = 0x4000
(16384)
Marks a crossing area or a lane that participates in a crossing. -
RequireUnsafe = 0x8000
(32768)
Specifies that an "unsafe" lane type/feature is required (opposite of RequireSafe). -
RequirePavement = 0x10000
(65536)
Requires pavement/sidewalk features associated with the lane. -
RequireYield = 0x20000
(131072)
Indicates a yield requirement for the lane (give-way behavior). -
DuplicateSides = 0x40000
(262144)
Indicates sides should be duplicated (mirrored or replicated lanes on both sides). -
RequireSafeMaster = 0x80000
(524288)
Requires a master/primary safe lane when composing multiple lane elements (used in complex prefab rules).
Properties
- This enum does not define properties.
Enums expose named constant values; any query about a value should be done via bitwise operations or Enum helpers.
Constructors
- Enums use the implicit enum constructor; there are no public constructors to initialize values beyond assigning one of the defined constants or a combination thereof.
Methods
- This enum declares no methods.
Use standard System.Enum helpers (Enum.HasFlag, Enum.ToString, or bitwise operators) to inspect or combine flags.
Usage Example
using Game.Prefabs;
public class LaneExample
{
public void Configure()
{
// Combine flags to describe a lane that is on the left and requires a safe configuration
SecondaryNetLaneFlags flags = SecondaryNetLaneFlags.Left | SecondaryNetLaneFlags.RequireSafe;
// Check using HasFlag
bool isLeft = flags.HasFlag(SecondaryNetLaneFlags.Left);
// Check using bitwise operation (often faster)
bool requiresStop = (flags & SecondaryNetLaneFlags.RequireStop) != 0;
// Add a flag
flags |= SecondaryNetLaneFlags.CanFlipSides;
// Remove a flag
flags &= ~SecondaryNetLaneFlags.RequireSafe;
}
}