Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Unity 5.2 - Gizmo rendering

Discussion in 'Physics' started by eses, Sep 8, 2015.

  1. eses

    eses

    Joined:
    Feb 26, 2013
    Posts:
    2,041
    Had to test Unity 5.2 as it's out!

    Seems like Gizmos don't render the same way as with 5.1.2 / 5.1.3 - they seem to be rendered like lit wireframe in both editor and game view.

    This makes it bit hard to see debug rays, capsules and such.

    Or is there is a setting to change this?

    Seems like a bug as there's no point to shade debug line renders that often, it only makes them hard to read.
     
  2. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    1,827
    It's a known bug:

    http://issuetracker.unity3d.com/iss...drawline-random-colors-if-3d-icons-turned-off

    The bug has already been fixed, and according to the Unity team the fix will be merged into an upcoming release. I'd expect Unity 5.3 or some 5.2 patch release.

    FYI, the effect is related to the graphics API in use. In DirectX 11 the gizmos are renderer as random colors. DirectX 9 don't display gizmos at all. My own workaround for now is to selecting OpenGL2 as graphic API. Here the behavior is like in 5.1, but gizmos are drawn in white.

    You can change the graphics API at Edit > Project Settings > Player > Other Settings:
    - Untick the option "Auto Graphics API for Windows". A list of graphic APIs appears.
    - Click the "+" sign and add the OpenGL2 option.
    - Back in the list, move OpenGL2 to the top position. Click Apply when asked.
     
    Last edited: Sep 12, 2015
  3. eses

    eses

    Joined:
    Feb 26, 2013
    Posts:
    2,041
    Edy:
    Your solution worked (I kinda expected it would) - It's better than nothing, and most likely this issue will get fixed soon (I hope). Thanks!
     
    Edy likes this.
  4. nbg_yalta

    nbg_yalta

    Joined:
    Oct 3, 2012
    Posts:
    369
    Same here, gizmos are renderer with random colors, but works ok with '3D Icons' turned on.
     
  5. eses

    eses

    Joined:
    Feb 26, 2013
    Posts:
    2,041
    nbg_yalta: Hey, thanks for that info! I'm so used to working with 2D icons, that testing this didn't even cross my mind! Good info, it's even better fix!
     
  6. LloydCorfex

    LloydCorfex

    Joined:
    Apr 18, 2013
    Posts:
    1
    Little workaround:
    Step 1) Enable "3D Icons"

    Step 2) Draw the Gizmos above the object
    Code (CSharp):
    1. Gizmos.color = //whatever you want
    2. Gizmos.DrawLine(new Vector3(Start.transform.position.x, Start.transform.position.y + 1, Start.transform.position.z), new Vector3(End.transform.position.x, End.transform.position..y + 1, End.transform.position..z));
     
    Last edited: Sep 14, 2015
  7. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    1,827
    I've got confirmation that this issue should not appear in the latest version, 5.2.1p1, which will be available soon.
     
    eses likes this.
unityunity