Path2D
Local coordinate system for a shared Curve2D and child PathFollow2D instances.
Create a Curve2D, assign it to Path2D and add PathFollow2D as a direct child. The resource is shared: every owner sees edits. Curve data are local; parent transform/scale affect follower world positions rather than automatically changing GetBakedLength.
Path2D does not animate Progress, build a road or resolve collisions. Assigning null removes the Curve rather than teleporting followers to the start. Reference sharing, direct parenting and transform behavior were tested in Windows headless; visual debug paths and physics were not accepted.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
Path2DConstructor
public Path2D();Creates an Entity2D container without a Curve. Assign Curve2D and add PathFollow2D as a direct child. Path2D advances no Progress, creates no collisions and is not a rendered game road. Free owned detached instances with Free.
Properties1
CurveProperty
public Curve2D Curve { get; set; }Shared Curve2D in Path2D local coordinates. Setter reconnects Changed; in-tree edits update child PathFollow2D instances. Clones no resource and does not reinterpret their Progress as a saved ratio. null removes the path; followers can retain their previous transforms.
Methods2
GetCurveCurve2D
public Curve2D GetCurve();Returns a shared Curve2D or null; creates no new curve. Prepare a separate resource for independent edits; do not dispose a borrowed wrapper.
Curve2DShared Curve2D or null; borrowed wrapper.
SetCurvevoid
public void SetCurve(Curve2D curve);Assigns/clears shared Curve2D and observes its Changed. Starts no movement. ProgressRatio additionally needs an in-tree PathFollow2D and nonzero curve length.
| Name | Type | Default |
|---|---|---|
curve | Curve2D | — |
curveShared Curve2D or null to clear; geometry is local to Path2D.