diff --git a/Explorer/Assets/DCL/UI/ButtonWithAnimationView.cs b/Explorer/Assets/DCL/UI/ButtonWithAnimationView.cs index 4f90478c908..e5fb768535b 100644 --- a/Explorer/Assets/DCL/UI/ButtonWithAnimationView.cs +++ b/Explorer/Assets/DCL/UI/ButtonWithAnimationView.cs @@ -23,8 +23,14 @@ private void OnEnable() { Button.onClick.AddListener(OnClick); ButtonAnimator.enabled = true; - ButtonAnimator.Rebind(); - ButtonAnimator.Update(0); + + // Animator.Update is only legal on an active-in-hierarchy object; these buttons + // are often enabled while their panel is still hidden during UI bootstrap. + if (ButtonAnimator.gameObject.activeInHierarchy) + { + ButtonAnimator.Rebind(); + ButtonAnimator.Update(0); + } } private void OnDisable() diff --git a/Explorer/Assets/DCL/UI/SectionSelectorController.cs b/Explorer/Assets/DCL/UI/SectionSelectorController.cs index 47895a2c149..f806f6dec3e 100644 --- a/Explorer/Assets/DCL/UI/SectionSelectorController.cs +++ b/Explorer/Assets/DCL/UI/SectionSelectorController.cs @@ -38,7 +38,9 @@ public void SetAnimationState(bool isOn, TabSelectorView selectorToggle) if (isOn) selectorToggle.tabAnimator.SetTrigger(UIAnimationHashes.ACTIVE); - else + // Animator.Update is only legal on an active-in-hierarchy object; non-selected + // tabs are frequently snapped to their resting frame while still hidden. + else if (selectorToggle.tabAnimator.gameObject.activeInHierarchy) { selectorToggle.tabAnimator.Rebind(); selectorToggle.tabAnimator.Update(0); diff --git a/Explorer/Assets/DCL/UI/TabSelectorView.cs b/Explorer/Assets/DCL/UI/TabSelectorView.cs index 4d4ae223f8a..a51d18648ab 100644 --- a/Explorer/Assets/DCL/UI/TabSelectorView.cs +++ b/Explorer/Assets/DCL/UI/TabSelectorView.cs @@ -39,7 +39,9 @@ private void OnEnable() { tabAnimator.enabled = true; - if (tabAnimator != null) + // Animator.Update is only legal on an active-in-hierarchy object; tabs are + // frequently enabled while their panel is still hidden during UI bootstrap. + if (tabAnimator != null && tabAnimator.gameObject.activeInHierarchy) { tabAnimator.Rebind(); tabAnimator.Update(0);