A class in Root.Township, the global namespace.
Editor helper that shows the world and local distance to a target transform in the inspector and draws a line to it.
Constructors
| Member | What it is |
|---|
MeasureDistance() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
4 private and internal fields
| Member | What it is |
|---|
private float distance | World distance to the target. |
private float localDistance | Distance between the two local positions. |
private float localPositionMagnitude | Length of this object's local position. |
private Transform target | Transform measured to. |
Methods
2 private and internal methods
| Member | What it is |
|---|
private void OnDrawGizmosSelected() | Updates the distances and draws a line to the target. |
private void OnValidate() | Updates the shown distances. |