public void Push(PagesEnum page, params object[] parameters) { Shell.Current.GoToAsync(page.ToString()); Page lastPage = Shell.Current.Navigation.NavigationStack.LastOrDefault(); if (lastPage != null) { ((IBasePageViewModel)lastPage.BindingContext).OnPagePushing(parameters); } }
public GameObject GetPagePrefabByEnum(PagesEnum pageEnum) { if (pageEnum == PagesEnum.None) { return(null); } GameObject prefab = GetPagePrefabOrCachedPage(pageEnum); if (!prefab) { Debug.LogWarning("Trying to get prefab from enum " + pageEnum.ToString() + ", but prefab is empty."); } return(prefab); }