public static Page Replace(string pageName, string param = null, Admission admision = null) { if (AdmissionManager.busing) { return(null); } Debug.Log("Replace to: " + pageName); var oldPage = PageStack.Find(pageName); if (oldPage != null) { throw new Exception("page: " + pageName + " already in stack, can't replace, try use Backto"); } var fromPage = PageStack.Peek(); var page = TakeOrCreatePage(pageName); page.param = param; PageStack.RelpaceTop(page); RepositionMask(); if (admision != null) { AdmissionManager.Play(admision, fromPage, page); } return(page); }