Component that annotates a SplineComponent with metadata used when baking a racing path. Defines SplineType enum for surface kinds and SplineInfo component storing Type, Label, and an optional forward Next link to override junction inference.
namespace Machines.Race;
/// <summary>
/// Describes the type of a track section represented by a spline.
/// </summary>
public enum SplineType
{
Road,
Bridge,
OffRoad,
Tunnel,
/// <summary>
/// Markup/decoration splines - excluded from the racing path bake entirely.
/// </summary>
Custom
}
/// <summary>
/// Tags a <see cref="SplineComponent"/> with a surface type read by <see cref="RacingPath"/> during baking.
/// </summary>
public sealed class SplineInfo : Component
{
/// <summary>
/// The surface/environment type of this spline section.
/// </summary>
[Property]
public SplineType Type { get; set; } = SplineType.Road;
/// <summary>
/// Display name for this section, shown in debug and minimap overlays.
/// </summary>
[Property]
public string Label { get; set; } = "";
/// <summary>
/// Forward link to the next spline on the racing loop. Set this to override junction
/// inference where geometry is ambiguous (jumps, stacked multi-level roads).
/// Null = let the baker infer the continuation from geometry.
/// </summary>
[Property]
public SplineComponent Next { get; set; }
}