public void OnEnable() { m_PackageDatabase.onPackageProgressUpdate += OnPackageProgressUpdate; m_PageManager.onRefreshOperationStart += OnRefreshOperationStart; m_PageManager.onRefreshOperationFinish += OnRefreshOperationFinish; m_PageManager.onVisualStateChange += OnVisualStateChange; m_PageManager.onListRebuild += OnListRebuild; m_PageManager.onListUpdate += OnListUpdate; m_UnityConnect.onUserLoginStateChange += OnUserLoginStateChange; // manually build the items on initialization to refresh the UI OnListRebuild(m_PageManager.GetCurrentPage()); }
public void Refresh() { var page = m_PageManager.GetCurrentPage(); Set(page?.numTotalItems ?? 0, page?.numCurrentItems ?? 0); }
private void OnUserLoginStateChange(bool loggedIn) { var page = m_PageManager.GetCurrentPage(); EnableMenuForCapability(page.capability); }