You already like Debug.DrawLine and Log? You will love DebugPlus’ DrawMesh, DrawSphere, LogOnScreen…
DebugPlus brings features that are missing in Unity Debug, allowing to draw gizmos and logs at run time, from anywhere in your code with a single line. Specify optional color, duration and matrix in a fluent way.
This free and open-source asset is in beta, you are welcome to report any issue in the github issue page. It will be released on the asset store when beta testing is done.
Gizmos are powerfull for debugging, but Unity Debug only offers Line and Ray. DebugPlus adds all built-in gizmos:
DebugPlus.DrawWireSphere(transform.position, 1).Color(Color.blue); DebugPlus.DrawCube(transform.position, new Vector3(1, 2, 1)).Color(Color.red).Duration(10).Matrix(m);
Log on screen
Console logs are sweet, but sometimes it’s more convienent to write things directly on the screen. Inspired by Unreal Engine 4, DebugPlus LogOnScreen let you write your logs with color and duration on the top left corner of your GUI.
DebugPlus.LogOnScreen("motion " + debugMotion).Color(Color.green); DebugPlus.LogOnScreen("An excpetion occured during played update : " + e.Message).Color(Color.red).Duration(10);
Note : on the first call to LogOnScreen, DebugPlus will create a special canvas that could mess with your existing GUI. Please report issues.
DrawArrow, DrawDisc, DrawText at a world position… I’m open to suggestions !