TrackFlow Pro Documentation 1
Generate roller coasters, railroads, conveyors and more with a physics aware spline and meshing system.
Loading...
Searching...
No Matches
TrackFlowPro.Editor.TrackFlowEditorSelection Class Reference

Editor-only selection state for TrackFlowSpline elements. More...

Static Public Member Functions

static void SetActiveSpline (TrackFlowSpline spline, bool clearKnots=true)
 Set the active selected spline, optionally clear the currently selected knots.
static void SetSelectedKnots (TrackFlowSpline spline, IEnumerable< int > indices)
 Set the selection state of knots from a TrackFlowSpline.
static void Clear ()

Properties

static TrackFlowSpline ActiveSpline [get]
static IReadOnlyList< int > SelectedKnots [get]
static int PrimaryKnotIndex [get]

Events

static Action Changed

Static Private Member Functions

static TrackFlowEditorSelection ()
static void OnUnitySelectionChanged ()

Static Private Attributes

static int _activeSplineInstanceId
static readonly List< int > _selectedKnots = new List<int>(4)

Detailed Description

Editor-only selection state for TrackFlowSpline elements.

Unity Splines has a concept of "selected element" (knot/tangent/etc) that drives overlays. TrackFlowSpline is a single GameObject, so we provide this lightweight state holder to coordinate Scene handles, Inspector ListView selection, and the Scene overlay.

Constructor & Destructor Documentation

◆ TrackFlowEditorSelection()

TrackFlowPro.Editor.TrackFlowEditorSelection.TrackFlowEditorSelection ( )
staticprivate

Member Function Documentation

◆ Clear()

void TrackFlowPro.Editor.TrackFlowEditorSelection.Clear ( )
static

◆ OnUnitySelectionChanged()

void TrackFlowPro.Editor.TrackFlowEditorSelection.OnUnitySelectionChanged ( )
staticprivate

◆ SetActiveSpline()

void TrackFlowPro.Editor.TrackFlowEditorSelection.SetActiveSpline ( TrackFlowSpline spline,
bool clearKnots = true )
static

Set the active selected spline, optionally clear the currently selected knots.

Parameters
spline
clearKnots

◆ SetSelectedKnots()

void TrackFlowPro.Editor.TrackFlowEditorSelection.SetSelectedKnots ( TrackFlowSpline spline,
IEnumerable< int > indices )
static

Set the selection state of knots from a TrackFlowSpline.

Parameters
spline
indices

Member Data Documentation

◆ _activeSplineInstanceId

int TrackFlowPro.Editor.TrackFlowEditorSelection._activeSplineInstanceId
staticprivate

◆ _selectedKnots

readonly List<int> TrackFlowPro.Editor.TrackFlowEditorSelection._selectedKnots = new List<int>(4)
staticprivate

Property Documentation

◆ ActiveSpline

TrackFlowSpline TrackFlowPro.Editor.TrackFlowEditorSelection.ActiveSpline
staticget

◆ PrimaryKnotIndex

int TrackFlowPro.Editor.TrackFlowEditorSelection.PrimaryKnotIndex
staticget

◆ SelectedKnots

IReadOnlyList<int> TrackFlowPro.Editor.TrackFlowEditorSelection.SelectedKnots
staticget

Event Documentation

◆ Changed

Action TrackFlowPro.Editor.TrackFlowEditorSelection.Changed
static

The documentation for this class was generated from the following file: