Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question UI Performance Issue

Discussion in 'UGUI & TextMesh Pro' started by boiler_room, Aug 16, 2023.

  1. boiler_room

    boiler_room

    Joined:
    May 28, 2022
    Posts:
    11
    I've been working on an android game project for about a year. I have overcome many problems in this project and have progressed.

    this project is a 2D game and has a somewhat detailed interface and I have a problem with the performance of this interface.

    I am using "Sprite Atlas" for every sprites in the interface;

    The mobile phone I have "xiaomi red mi note 7" and I get the FPS values from here, and I also feel it while playing.

    firstly I thought that the cause of this problem was "setpass calls" and "batches" and I reduced it from 250 levels to 45-44. nothing has changed. "fps" values are the same.

    Then I realized that these sprites have high resolution. I've reduced it by almost 4x (the largest right now is about 50kb in size but compressed by krita).
    nothing has changed.

    Then I opened a different scene and transferred the interfaces that caused loss of performance. I turned off all "scripts". I gained about 5 FPS (from 45 to 50) (i thought its cause "update voids")

    "UI" options "render mode" nothing change. and yes the problem seems to be with the "UI".

    actually it's still a useful interface, but I don't want to drain the player's battery quickly. otherwise it works perfectly.


    now questions:

    1. How can I see "setpass calls" and "batches" values from android phone. I don't know if it's really caused by that. I want to test if "sprite atlas" works on my phone.

    2. Could this problem be related to "krita" compression? Will another program fix the problem?

    3. I could be wrong on the two questions above. If you want a different detail, just write. maybe the problem is different.
     
    Last edited: Aug 16, 2023
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,278
  3. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    11,105
    This is not a 2D feature thread, it's a UI thread. None of the 2D components render UI whilst some (Image component) can use sprite data but it does the rendering. I'll take a guess and assume you're using UGUI for which there is a dedicated forum. I'll move your post for you.

    if you're not using UGUI then please let me know (you don't specify) but are using SpriteRenderer2D then I can move this thread back.

    Thanks.
     
  4. boiler_room

    boiler_room

    Joined:
    May 28, 2022
    Posts:
    11
    sorry my bad. its about the "UGUI".