Visualize gameplay using DRAW DEBUG TOOLS (Unity3D)

OVERVIEW

Developing gameplay mechanics and systems can be challenging, DrawDebugTools (DDT) make it easy for you by offering several draw functions to help you debug visually and know what your code is doing.

unity draw debug tools
unity draw debug tools

CHANGE LOG

Latest release changes (v 2.1):

  • Adding function to visualize RaycastHit datas.
  • Update 3d text font, now much more clear and beautiful.
  • Fixing issues.
  • Adding improvements.

FEATURES

  1. Offes multiple functions to draw different shapes: line, box, sphere, capsule, arrow, cylinder, camera shape… and many many more
  2. Visualize Raycast Hit infos and other datas are coming soon (Collision infos, Rigidbody forces, AI path….)
  3. Shapes are drawn and visible in both: scene view and game view 
  4. Offers an on-screen log message function
  5. Easy to setup and easy to use
  6. The package includes many examples that demonstrate how to use it
  7. It has everything you need to visualize gameplay datas
  8. Support VR
  9. Optimized to work without impacting your game performance
  10. Call draw functions from anywhere in your code
  11. Works on all platforms
  12. Support all rendering pipelines: HDRP, URP, SRP
  13. Dedicated support

FUNCTIONALITIES

  • DebugCamera: A detachable camera to help you move freely in your scene while running your game in editor or in standalone.
  • TimeControl: While in debug camera mode, you have the ability to stop time, slow it down or speed it up. 
  • Object debug info: While in debug camera mode, you can see the name of the object you are looking at, and the materials applied to that object.

FloatGraph: Visualize value changes of a given float variable.

COMING FUNCTIONALITIES

  • FPS Graph: Display an overlay graph that shows the changes of the frame rate per second over time.
  • Physic debugger: Display collision shapes and other datas like contact points when a collision occurs, force vectors, 

SETUP

To start working with DrawDebugTools DDT is very easy. 

Drag and drop DDT prefab in your scene:

Call drawing functions from your code.

EXAMPLE

This is an example of drawing a sphere, grid, and a 3d text:

Code :

DrawDebugTools.DrawGrid(Position, GridSize, 1.0f, 1.0f);
DrawDebugTools.DrawSphere(Position, 1.0f, 12, Color.Green);
DrawDebugTools.DrawString3D(Position, Rotation, “SPHERE”, TextAnchor.LowerCenter, Color.White, 1.5f);

The signatures of the functions used are:

DrawDebugTools.DrawGrid(Vector3 Position, float GridSize, float CellSize, float LifeTime = 0.0f);
DrawDebugTools.DrawSphere(Vector3 Center, float Radius, int Segments, Color Color, float LifeTime = 0.0f);
 DrawDebugTools.DrawString3D(Vector3 Position, Quaternion Rotation, string Text, TextAnchor Anchor, Color TextColor, float TextSize = 1.0f, float LifeTime = 0.0f);  

The tool is available on asset store:

Thanks for reading