Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

DebugPlus, draw all gizmos and on screen text in a single line

Discussion in 'Made With Unity' started by methusalah999, Mar 7, 2019.

  1. methusalah999

    methusalah999

    Joined:
    May 22, 2017
    Posts:
    640
    demo.jpg

    DebugPlus
    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. Just specify a color, a duration and optionnaly a matrix.

    This free and open-source asset is in beta on Github, 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.

    A demo scene is available to showcase things.

    Gizmos
    Gizmos are powerfull for debugging, but Unity Debug only offers Line and Ray. DebugPlus adds all built-in gizmos:
    • DrawCube
    • DrawSphere
    • DrawMesh
    • DrawIcon
    • etc.
    Examples:
    Code (CSharp):
    1. DebugPlus.DrawWireSphere(transform.position, 1, Color.blue);
    2. DebugPlus.DrawCube(transform.position, new Vector3(1, 2, 1), Color.red, duration: 10);
    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.

    Examples:
    Code (CSharp):
    1. DebugPlus.LogOnScreen("motion " + debugMotion, Color.green, 0);
    2. DebugPlus.LogOnScreen("An excpetion occured during played update : " + e.Message, Color.red, 10);
    Note : on the first call to LogOnScreen, DebugPlus will create a special canvas that could mess with your existing GUI. Please report issues.

    Planned features
    DrawArrow, DrawDisc, DrawText at a world position... I'm open to suggestions.
     
    Rodolfo-Rubens likes this.
  2. methusalah999

    methusalah999

    Joined:
    May 22, 2017
    Posts:
    640
    I've posted that in the Asset and Asset store section. @moderator could you please delete this thread?