public IEnumerator TestGoBackRestoresPreviousViewAfterAnimationFinishes() { yield return(null); Subject.PushView(Views[1]); yield return(new WaitForSeconds(AnimationDuration + 0.1f)); Subject.GoBack(); yield return(new WaitForSeconds(AnimationDuration + 0.1f)); Assert.IsTrue(Views[0].gameObject.activeInHierarchy); Assert.IsFalse(Views[1].gameObject.activeInHierarchy); Assert.IsFalse(Views[2].gameObject.activeInHierarchy); Assert.AreEqual(1, Views[0].GetSiblingIndex()); Assert.AreEqual(2, Views[1].GetSiblingIndex()); Assert.AreEqual(0, Views[2].GetSiblingIndex()); }
public void GoBack() { ViewSwitcher.GoBack(); _activeView = ViewSwitcher.ActiveView().GetComponent <GenericMultiProductShopView>(); OnViewChanged(); }