Path3D
Entity3D container for a shared Curve3D resource in local coordinates.
Assign a Curve3D; Path3D supplies coordinates and change notifications but does not itself animate an object or build roads/collisions. Query a world point through ToLocal → Curve.GetClosestPoint → ToGlobal. Do not pass world coordinates directly to the local curve.
Curve is a shared reference. Editing one resource affects every owner; prepare separate resources for independent paths. CurveChanged is emitted only inside the tree, including reassignment of the same Curve. DebugCustomColor affects debug display rather than a final material.
Shared references, signals and local/world conversion were tested in Windows headless. PathFollow3D motion, debug gizmos and final graphics were not executed in this review.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
Path3DConstructor
public Path3D();Creates an Entity3D path container without a Curve. Assign a Curve3D resource; Path3D does not itself follow it or create mesh/collision. Follow tree lifecycle for owned Entities; free detached instances with Free.
Properties2
CurveProperty
public Curve3D Curve { get; set; }Shared Curve3D in Path3D local coordinates, not a copy. Resource edits affect every owner. Setter reconnects Changed and updates the path even for the same reference. CurveChanged is emitted only inside EntityTree. null clears the reference; do not dispose a borrowed getter wrapper.
DebugCustomColorProperty
public Color DebugCustomColor { get; set; }Debug path-display color. Black Color(0,0,0,1) selects the ProjectSettings color rather than forcing black. Not a final mesh material. Debug material updates emit DebugColorChanged; assigning the same value can notify too.
Methods4
GetCurveCurve3D
public Curve3D GetCurve();Returns the shared Curve3D or null; its local Sample/Closest results exclude Path3D transform. Use ToLocal/ToGlobal explicitly.
Curve3DShared Curve3D or null; borrowed wrapper.
GetDebugCustomColorColor
public Color GetDebugCustomColor();Reads the stored debug color, which can be the black ProjectSettings sentinel. Not a debug-path visibility test.
ColorStored debug color, including a possible black sentinel.
SetCurvevoid
public void SetCurve(Curve3D curve);Assigns a shared Curve3D reference and observes Changed without cloning. CurveChanged is not emitted outside the tree; inside it, the setter notifies even for the same reference.
| Name | Type | Default |
|---|---|---|
curve | Curve3D | — |
curveShared Curve3D or null to clear; prepare an independent copy separately.
SetDebugCustomColorvoid
public void SetDebugCustomColor(Color debugCustomColor);Changes debug color and updates its debug material. Does not itself enable debug-path display or modify Curve3D.
| Name | Type | Default |
|---|---|---|
debugCustomColor | Color | — |
debugCustomColorDebug color; opaque black selects the ProjectSettings default.
Signals and events2
CurveChangedEvent
public event Action CurveChanged;Argument-free event after a Curve/setter path update, only while Path3D is in the tree. Not an arrival event or a character-motion step. One shared resource can notify multiple Path3D instances.
DebugColorChangedEvent
public event Action DebugColorChanged;Argument-free event after a debug-material update, including reassignment of the same color. Reports neither curve geometry nor final-render readiness.