Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

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:
    889
    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:
    889
    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.