Developing gameplay mechanics and systems can be challenging but DrawDebugTools (DDT) make it easy for you by offering several draw functions to help you debug visually and know what your code is doing.
- Very easy and intuitive to use
- Easy to setup
- Many examples that demonstrate how to use it
- It has everything you need to visualize complex spatial debug data
- It uses unity GL functions
- Optimized to work without impacting your game performance
- You can call draw functions from anywhere in your code
- VR is supported
- Works on Desktop, Web and Mobile (IOS is not supported)
- Dedicated support
- 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 can 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, you also see the materials applied to that object.
- FloatGraph: Visualize value changes of a given float variable.
- 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,
To start working with DrawDebugTools DDT is very easy.
- First, drag and drop DDT prefab in your scene:
- Secondly, Select DDT prefab and set your active camera:
- Finally, you are ready to call drawing functions !
This is an example of drawing a sphere, grid, and a 3d text:
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