Search Unity

Unity UI Perfromance of Button transition (animation)

Discussion in 'UGUI & TextMesh Pro' started by FrancoD, Jul 5, 2019.

  1. FrancoD

    FrancoD

    Joined:
    May 31, 2016
    Posts:
    6
    Hi everyone,i have a question about the perfromance of UI transitions (animation),what is the cost of animated each button of all my UI ?
    I trying to make a mobile UI System using new prefabs system (nested prefabs)...so i have one prefab,
    eg: Back_Button ... this has differents components like Image,Button (script),sound emitter...and i want animate this button (simple animated like change scale when button in clicked).
    Keeping mind that is a mobile game...whats is the best way to animate IU ? Any third-party tool ? like Itween ....Any tips ?

    Button.JPG

    Thanks... :D
     
  2. unityJe

    unityJe

    Joined:
    Oct 1, 2018
    Posts:
    7
    Try using the built in Animator. Here's a video I use when I need to remember how to animate (even though the video itself is about dialogue systems).

    If you want to see the 'cost' of using an animation, try looking at the profiler by clicking Window > Analysis > Profiler, and comparing CPU usage with them on and off (assuming that's what you mean by 'cost'). As long as your scripting is efficient, it shouldn't be expensive.
     
    FrancoD likes this.
  3. FrancoD

    FrancoD

    Joined:
    May 31, 2016
    Posts:
    6


    Yes,when i tell "cost" i talking about "performance"... Thanks for your help :)