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
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Gizmo Optimization / Performance Improvements

Discussion in '2020.2 Beta' started by eolson, Oct 22, 2020.

  1. eolson

    eolson

    Joined:
    Oct 6, 2017
    Posts:
    11
    Unity Version: 2020.2.0b7.3288

    I'm generating lots of ray casts, storing that data, and viewing the contact points as spheres, and the initial cast as a line.

    Scene view seems to still lag when showing lots of lines and spheres.

    I can look into other ways of presenting this data, but just thought I'd give a heads up.
     
  2. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,132
    Hi @eolson,

    Was performance for this better in previous versions? If so, did you already submit a bug report for it?
     
  3. eolson

    eolson

    Joined:
    Oct 6, 2017
    Posts:
    11
    Performance seemed the same as it was on previous versions, nothing seemed to improve. I've tried the same exact scenario on 2019.4 and this version, with no gains.

    I just mention this because I saw in the 2020.2 blog post it was mentioned that gizmos performance were improved.
     
  4. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,132
    Thanks for the context. Did you have a chance to profile this yet? If there's no improvement to gizmo rendering times, it would be great if you could send over a reproducible via a bug report so we can have a look.
     
  5. eolson

    eolson

    Joined:
    Oct 6, 2017
    Posts:
    11
    To recreate just loop through and generate lots of sphere gizmos at random points. I'll try and profile later today.
     
  6. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,770
    Not necessarily "all" gizmo scenarios have seen performance improvements. Particularly what should be faster:
    - Gizmos where there's a lot of _different_ gizmos rendered at once (i.e. different colors, gizmo types, etc.); the sorting & batching of those was optimized.
    - Gizmos that are so small on screen that they can be skipped from rendering (or outside of screen completely) are faster now.

    Your particular case may or might not see performance improvements -- a profiler data capture (or an exact scene you're testing) as a bug report would be helpful.
     
  7. eolson

    eolson

    Joined:
    Oct 6, 2017
    Posts:
    11
    Good to know, thank you! I can't send the exact scene sadly, but when I have time I'll try and take a profile capture.