Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Graphics [SOLVED] Handles.DrawLine 2 pixel thickness, not 1

Discussion in '5.4 Beta' started by Quatum1000, Mar 1, 2016.

  1. Quatum1000

    Quatum1000

    Joined:
    Oct 5, 2014
    Posts:
    887
    In Editor Window.
    Handles.DrawLine(new Vector2(500, 0), new Vector2(500, 500));
    Handles.DrawLine(new Vector2(0, 200), new Vector2(500, 200));

    Draws a lines with 2 pixel thickness. Not 1

    Code (CSharp):
    1. Handles.DrawLine(new Vector2(0, 100), new Vector2(500, 100));
    Untitled-1.jpg
     
  2. Quatum1000

    Quatum1000

    Joined:
    Oct 5, 2014
    Posts:
    887
    I used a Texture2D of 2 pixels for Handles.DrawAAPolyLine(AAline, size, v);

    Seems Handles.DrawLine use internaly AAline Texture2D when called Handles.DrawAAPolyLine too.
    It's required temporarily set AAline=null before use Handles.DrawLine. :confused:
    (Depends on the alpha blending pixel in Texture2D AAline)
     
    FlightOfOne likes this.