Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Feedback Animator with 1-frame anim are invalidating the frame

Discussion in 'UGUI & TextMesh Pro' started by gsylvain, Feb 16, 2021.

  1. gsylvain


    Aug 6, 2014
    Just a feedback here. I often read optimization guides saying that having some one-frame animation on UI elements is consistently re-writing its data, thus invalidating the UI and forcing a layout rebuild.

    I know that it is possible to sort of bypass this "issue" by adding a custom AnimatorStateBehaviour on the animator's node that contains the one-frame animation and deactivating the animator when reaching it. This is far from elegant and may introduce errors because we have to manually detect when to re-enable the animator.

    My feedback is: would it be possible to expose a "write once" checkbox somewhere that would only apply the one-frame animation data once and never do it again while it stays in that state?

    Thank you