Skip to main content

DistanceToLineTest

A class in Root.Township, the global namespace.

Editor test component that draws a segment and the closest point on it to this object.

Constructors​

MemberWhat it is
DistanceToLineTest()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

3 private and internal fields
MemberWhat it is
private float distanceLast measured distance, shown in the inspector.
private Transform endSegment end.
private Transform startSegment start.

Methods​

1 private and internal method
MemberWhat it is
private void OnDrawGizmosSelected()Draws the segment and a line to its closest point, and stores the distance.