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 gyzmos and log on screen in a single line of code

Discussion in 'Assets and Asset Store' started by methusalah999, Feb 28, 2020.

  1. methusalah999

    methusalah999

    Joined:
    May 22, 2017
    Posts:
    640
    large.png


    DebugPlus is a free and open source plugin that help you debug your code.
    • Draw all Unity gyzmos in a single line of code.
    • Log directly on the screen, the Unreal Engine way.
    • Time many blocs of code and get a detailled report.
    Its fluent syntax keeps things compact.

        DebugPlus.LogOnScreen("my log").Color(Color.green).Duration(1);

        DebugPlus.DrawSphere(position, radius).Color(Color.blue).Matrix(myMatrix);


    The code chronometer can help you find the blocs that takes the most time.
    Code (CSharp):
    1. private void MethodA() {
    2.     DebugPlus.StartChronometer();
    3.     // Method body
    4.     DebugPlus.StopCurrentChronometer();
    5. }
    6.  
    7. // Example of report:
    8. // Demo.MethodA : 236 ms
    9. //      Demo.MethodB : 183 ms
    10. //          Demo.MethodB.sub bloc : 19 ms
    11. //          Demo.MethodC : 163 ms (10 per call)
    12. //      Demo.MethodC : 53 ms (10 per call)
    13.  
    Get it on the Asset Store: https://assetstore.unity.com/packages/tools/integration/debugplus-144985
    Get it on github: https://github.com/benoit-dumas/DebugPlus

    If you like DebugPlus, don't forget to vote for it on the store !
    And if you need help or want to report a bug, please write me here or in PM.

    Have fun !

    Ben