Search Unity

Question Importance of UI optimization in PC environments

Discussion in 'UGUI & TextMesh Pro' started by seoyeon222222, May 12, 2021.

  1. seoyeon222222

    seoyeon222222

    Joined:
    Nov 18, 2020
    Posts:
    187
    I know this can be a stupid question.
    Of course, each game has a different structure, and the more optimized it is, the better.
    However, the answer is not known until all functions are developed and compared,
    so I wonder what experienced people think.

    I'm worried whether this is too much of a "premature optimisation"
    My target platform is a high-end PC console, not mobile.

    Do UI optimization issues below have a big impact on PC console games?
    I don't know if these issues are necessary tips for only low-spec devices such as mobile..or not
    - Divide dynamic ui canvas and static ui canvas
    - enable/disable only canvas components
    - improper use of Sprite/Image/Raw Image
    - Do not use LayoutGroup (like vertical group)
    etc..
    Especially, I've seen a lot of stories about do not use layout groups.
    It's horrible to imagine working with only anchors and pivots for multi-resolution without using layout groups.

    Do these issues show significant performance differences in PC games?
    Is it important enough to actually feel it(Critical Frame Drop)?
     
  2. KrisDevelopment

    KrisDevelopment

    Joined:
    Jul 26, 2015
    Posts:
    36
    From my experience, if you have relatively simple UI it's not much of a problem. If you have a lot of UI however, it is heavy mostly only when it rebuilds the layout, so avoid stuff with animations (look into tweens?). It's a good practice to split things into different canvases depending on when you expect them to repaint. For the most part, just open up the profiler in "deep profile" mode and look for spikes there. If you target high-end machines UI optimization usually isn't your highest priority.
     
    seoyeon222222 likes this.
  3. seoyeon222222

    seoyeon222222

    Joined:
    Nov 18, 2020
    Posts:
    187
    Thank you for sharing the good experience. :)
    It was helpful