private void OnPackagesChanged(PackagesChangeArgs args) { var selection = m_PageManager.GetSelection(); if (args.added.Concat(args.removed).Concat(args.updated).Any(p => selection.Contains(p.uniqueId))) { Refresh(selection); } }
private void OnPackagesChanged(PackagesChangeArgs args) { GetPageFromTab().OnPackagesChanged(args); foreach (var package in args.removed) { var packageSelectionObject = GetPackageSelectionObject(package); if (packageSelectionObject != null) { m_PackageSelectionObjects.Remove(packageSelectionObject.uniqueId); UnityEngine.Object.DestroyImmediate(packageSelectionObject); } } }
private void OnPackagesChanged(PackagesChangeArgs args) { var selectedPackageUniqueId = packageSelectionObject?.packageUniqueId; if (string.IsNullOrEmpty(selectedPackageUniqueId)) { return; } if (args.added.Concat(args.removed).Concat(args.updated).Any(p => p.uniqueId == selectedPackageUniqueId)) { GetPackageAndVersion(packageSelectionObject); isInspectorDirty = true; } }
private void OnPackagesChanged(PackagesChangeArgs args) { if (args.progressUpdated.Any() || args.added.Any() || args.removed.Any()) { if (Refresh()) { ShowWithNewWindowSize(); } else { Close(); } } }
private void OnPackagesChanged(PackagesChangeArgs args) { UpdateOrdering(m_PageManager.GetCurrentPage()); if (m_PackageFiltering.currentFilterTab == PackageFilterTab.MyRegistries) { // We can skip the whole database scan to save some time if non of the packages changed are related to scoped registry // Note that we also check `preUpdate` to catch the cases where packages are move from ScopedRegistry to UnityRegistry if (!args.added.Concat(args.removed).Concat(args.updated).Concat(args.preUpdate).Any(p => p.Is(PackageType.ScopedRegistry))) { return; } if (!m_PackageDatabase.allPackages.Any(p => p.Is(PackageType.ScopedRegistry))) { SetFilter(PackageFilterTab.UnityRegistry); } } if (args.progressUpdated.Any() || args.added.Any() || args.removed.Any()) { RefreshInProgressSpinner(); } }
public abstract void OnPackagesChanged(PackagesChangeArgs args);
private void RefreshDependencies(PackagesChangeArgs _) { RefreshDependencies(); }