public virtual void Show(Context context) { if (FindTarget() is PageContainer pc) { pc.LoadPage(name, context); } else { PageContainer.Load <Page>(name, context); } }
public static T Load <T>(string name, Context context = null) where T : Page { PageContainer c = FindObjectOfType <PageContainer>(); if (c != null) { T page = c.LoadPage <T>(name, context); if (page != null) { page.gameObject.SetActive(true); } return(page); } return(null); }
internal void SetContainer(PageContainer owner) { this.owner = owner; }