Skip to content

Game.Prefabs.ObjectSubLaneInfo

Assembly:
Assembly-CSharp.dll

Namespace:
Game.Prefabs

Type:
class

Base:
System.Object

Summary:
Serializable data container used by prefab/object systems to represent a sub-lane's configuration and geometry. Holds a reference to the lane prefab, the Bezier curve describing the lane shape, and index pairs used for node and parent mesh identification. Typically used internally by lane/mesh generation code to keep per-sub-lane metadata.


Fields

  • public NetLanePrefab m_LanePrefab
    Reference to the NetLanePrefab describing lane properties (visuals, lanespecific settings). May be null if not assigned. NetLanePrefab is specific to the game's lane prefab system.

  • public Bezier4x3 m_BezierCurve
    A Bezier4x3 curve (from Colossal.Mathematics) that defines the geometry of the sub-lane. Used for positioning and shaping the lane mesh/objects along the lane segment.

  • public int2 m_NodeIndex = new int2(-1, -1)
    Two-component integer vector (Unity.Mathematics.int2) storing node indices. Default is (-1, -1) indicating uninitialized/invalid indices. Typically holds identifiers for start/end or related node references for the sub-lane.

  • public int2 m_ParentMesh = new int2(-1, -1)
    Two-component integer vector storing parent mesh identifiers or indices. Default is (-1, -1) indicating no parent mesh assigned. Used to link this sub-lane to a parent mesh structure.

Properties

  • This class exposes no properties; it uses public fields for simple data access.

Constructors

  • public ObjectSubLaneInfo()
    Implicit parameterless constructor provided by the runtime. Fields are initialized to their default values (m_NodeIndex and m_ParentMesh set to (-1, -1) as declared).

Methods

  • This class defines no methods. It is a plain data holder / DTO.

Usage Example

// Create and initialize a sub-lane info
var subLane = new Game.Prefabs.ObjectSubLaneInfo();

// Assign a lane prefab (assumes lanePrefab is obtained from some prefab registry)
subLane.m_LanePrefab = lanePrefab;

// Set the bezier curve (assumes you computed or retrieved one)
subLane.m_BezierCurve = computedBezier;

// Mark node indices and parent mesh indices
subLane.m_NodeIndex = new Unity.Mathematics.int2(startNodeId, endNodeId);
subLane.m_ParentMesh = new Unity.Mathematics.int2(parentMeshId, 0);

{{ Notes: - The class is marked [Serializable] so it can be serialized by Unity/CLR serializers where applicable. - int2 is from Unity.Mathematics; Bezier4x3 is from Colossal.Mathematics — ensure the appropriate using/imports are available where you use this type. - This is a minimal data container; logic for mesh generation, lane placement, or serialization is handled elsewhere in the prefab/mesh pipeline. }}