示例#1
0
        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);
                }
            }
        }
示例#3
0
        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;
            }
        }
示例#4
0
 private void OnPackagesChanged(PackagesChangeArgs args)
 {
     if (args.progressUpdated.Any() || args.added.Any() || args.removed.Any())
     {
         if (Refresh())
         {
             ShowWithNewWindowSize();
         }
         else
         {
             Close();
         }
     }
 }
示例#5
0
        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();
            }
        }
示例#6
0
 public abstract void OnPackagesChanged(PackagesChangeArgs args);
示例#7
0
 private void RefreshDependencies(PackagesChangeArgs _)
 {
     RefreshDependencies();
 }