Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

Feedback Animator with 1-frame anim are invalidating the frame

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

  1. gsylvain

    gsylvain

    Joined:
    Aug 6, 2014
    Posts:
    104
    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