Game.Prefabs.AuxiliaryLaneInfo
Assembly:
Assembly-CSharp (inferred)
Namespace: Game.Prefabs
Type:
public class (marked [Serializable])
Base:
System.Object
Summary:
Holds configuration data for an auxiliary lane placement prefab used by the game's road/track systems. This serializable container references the lane prefab, spatial placement, placement requirements, spacing parameters and simple placement flags. Primarily used by prefab definitions and placement logic to decide where and how an auxiliary lane should be instantiated alongside a main network piece.
Fields
-
public NetLanePrefab m_Lane
Reference to the lane prefab to place. This points to the lane definition (visual/model and behaviour) that will be used for the auxiliary lane. -
public float3 m_Position
Local position (relative to the parent network piece) where the auxiliary lane should be placed. Uses Unity.Mathematics.float3 (x,y,z). -
public NetPieceRequirements[] m_RequireAll
Array of requirements that must all be satisfied for this auxiliary lane to be allowed. Each entry is a NetPieceRequirements instance describing a required property or feature of the main piece or environment. -
public NetPieceRequirements[] m_RequireAny
Array of requirements where at least one must be satisfied. Use this to express alternative conditions that permit placement. -
public NetPieceRequirements[] m_RequireNone
Array of requirements that must NOT be present for this auxiliary lane to be allowed. Use to exclude placement for certain piece types or conditions. -
public float3 m_Spacing
Spacing vector for repeated placement of this auxiliary lane (if multiple instances are allowed). Interpreted in local coordinates; how far apart repeated auxiliary lanes should be placed. -
public bool m_EvenSpacing
If true, requested spacing should be applied evenly across the available length/area (rather than fixed offsets). Typically affects distribution logic when placing multiple auxiliary lanes along a segment. -
public bool m_FindAnchor
If true, placement logic should search for a suitable anchor point rather than using m_Position directly. Useful when the exact anchor location depends on runtime geometry.
Properties
- None (this class exposes public fields rather than properties)
Constructors
public AuxiliaryLaneInfo()
Default parameterless constructor (compiler-provided). Initializes all fields to their default values (null for reference types, zero vectors for float3, false for bools). Instances are typically populated via deserialization (e.g., from prefab data) or manually in code before use.
Methods
- None (this is a plain data container without behaviour)
Usage Example
using Unity.Mathematics;
using Game.Prefabs;
// create and configure an auxiliary lane entry
var aux = new AuxiliaryLaneInfo();
aux.m_Lane = /* reference to a NetLanePrefab instance */;
aux.m_Position = new float3(1.5f, 0f, 0f); // local offset from the main piece
aux.m_Spacing = new float3(0.0f, 0.0f, 5.0f); // 5 units between repeated lanes along z
aux.m_EvenSpacing = true;
aux.m_FindAnchor = false;
// set up requirements (examples; actual NetPieceRequirements construction depends on API)
aux.m_RequireAll = new NetPieceRequirements[] { /* one or more requirements */ };
aux.m_RequireAny = null;
aux.m_RequireNone = null;
// pass aux to prefab placement logic or add to a prefab's auxiliary lane list
Notes: - The type uses Unity.Mathematics.float3 for positions and spacing; ensure you have the Unity.Mathematics package available in mods that use this type. - NetLanePrefab and NetPieceRequirements are game-specific types; consult their documentation for details on how to construct requirement entries and valid lane prefab references.