Skip to main content

DebugExtension

A static class in Root.Township, the global namespace.

Static helpers that draw debug shapes with Debug.DrawRay and Debug.DrawLine. These only show in the Unity editor (scene view, or game view with gizmos on).

Methods​

MemberWhat it is
static void DebugArrow(Vector3 position, Vector3 direction, Color color, float duration = 0, bool depthTest = true)Draws a ray with a small cone at its tip.
static void DebugArrow(Vector3 position, Vector3 direction, float duration = 0, bool depthTest = true)Draws a ray with a small cone at its tip.
static void DebugBounds(Bounds bounds, Color color, float duration = 0, bool depthTest = true)Draws the edges of a bounds box.
static void DebugBounds(Bounds bounds, float duration = 0, bool depthTest = true)Draws the edges of a bounds box.
static void DebugCapsule(Vector3 start, Vector3 end, Color color, float radius = 1, float duration = 0, bool depthTest = true)Draws a wire capsule between two points.
static void DebugCapsule(Vector3 start, Vector3 end, float radius = 1, float duration = 0, bool depthTest = true)Draws a wire capsule between two points.
static void DebugCircle(Vector3 position, Vector3 up, Color color, float radius = 1, float duration = 0, bool depthTest = true)Draws a circle around a position, facing an up direction (world up by default).
static void DebugCircle(Vector3 position, Color color, float radius = 1, float duration = 0, bool depthTest = true)Draws a circle around a position, facing an up direction (world up by default).
static void DebugCircle(Vector3 position, Vector3 up, float radius = 1, float duration = 0, bool depthTest = true)Draws a circle around a position, facing an up direction (world up by default).
static void DebugCircle(Vector3 position, float radius = 1, float duration = 0, bool depthTest = true)Draws a circle around a position, facing an up direction (world up by default).
static void DebugCone(Vector3 position, Vector3 direction, Color color, float angle = 45, float duration = 0, bool depthTest = true)Draws a cone from a position along a direction with the given half angle (world up by default).
static void DebugCone(Vector3 position, Vector3 direction, float angle = 45, float duration = 0, bool depthTest = true)Draws a cone from a position along a direction with the given half angle (world up by default).
static void DebugCone(Vector3 position, Color color, float angle = 45, float duration = 0, bool depthTest = true)Draws a cone from a position along a direction with the given half angle (world up by default).
static void DebugCone(Vector3 position, float angle = 45, float duration = 0, bool depthTest = true)Draws a cone from a position along a direction with the given half angle (world up by default).
static void DebugCylinder(Vector3 start, Vector3 end, Color color, float radius = 1, float duration = 0, bool depthTest = true)Draws a wire cylinder between two points.
static void DebugCylinder(Vector3 start, Vector3 end, float radius = 1, float duration = 0, bool depthTest = true)Draws a wire cylinder between two points.
static void DebugLocalCube(Transform transform, Vector3 size, Color color, Vector3 center = null, float duration = 0, bool depthTest = true)Draws a box in a transform's or matrix's local space.
static void DebugLocalCube(Transform transform, Vector3 size, Vector3 center = null, float duration = 0, bool depthTest = true)Draws a box in a transform's or matrix's local space.
static void DebugLocalCube(Matrix4x4 space, Vector3 size, Color color, Vector3 center = null, float duration = 0, bool depthTest = true)Draws a box in a transform's or matrix's local space.
static void DebugLocalCube(Matrix4x4 space, Vector3 size, Vector3 center = null, float duration = 0, bool depthTest = true)Draws a box in a transform's or matrix's local space.
static void DebugPoint(Vector3 position, Color color, float scale = 1, float duration = 0, bool depthTest = true)Draws three crossed lines at a position.
static void DebugPoint(Vector3 position, float scale = 1, float duration = 0, bool depthTest = true)Draws three crossed lines at a position.
static void DebugWireSphere(Vector3 position, Color color, float radius = 1, float duration = 0, bool depthTest = true)Draws a wire sphere from three circles.
static void DebugWireSphere(Vector3 position, float radius = 1, float duration = 0, bool depthTest = true)Draws a wire sphere from three circles.