static PackageManagerUpdateAllUtility() { if (ADD_BTN) { PackageManagerExtensions.RegisterExtension(extension); } // if (FULL_LOGS) Debug.Log("check EditorPrefs"); // UpdatePackagesInProgress = EditorPrefs.GetBool("UpdatePackagesInProgress"); // UpdatePackagesCurrentCount = EditorPrefs.GetInt("UpdatePackagesCurrentCount"); // // if (UpdatePackagesCurrentCount > MAX_ITERATIONS) // { // ForceStop(); // Debug.LogError($"{MAX_ITERATIONS} packages updated, prevent infinite update"); // return; // } // // EditorPrefs.SetInt("UpdatePackagesCurrentCount",UpdatePackagesCurrentCount+1); // // if (UpdatePackagesInProgress && !UpdatingSomePackage) // { // ContinueUpdateAllpackages(); // } }
private void OnProcessAddAndRemoveResult(Request <PackageCollection> request) { PackageManagerExtensions.ExtensionCallback(() => { foreach (var packageInfo in addAndRemoveOperation.packagesNamesToRemove.Select(name => m_UpmCache.GetInstalledPackageInfo(name)).Where(p => p != null)) { foreach (var extension in PackageManagerExtensions.Extensions) { extension.OnPackageRemoved(packageInfo); } } }); m_UpmCache.SetInstalledPackageInfos(request.Result); PackageManagerExtensions.ExtensionCallback(() => { foreach (var packageInfo in addAndRemoveOperation.packageIdsToAdd.Select(id => m_UpmCache.GetInstalledPackageInfoById(id)).Where(p => p != null)) { foreach (var extension in PackageManagerExtensions.Extensions) { extension.OnPackageAddedOrUpdated(packageInfo); } } }); }
void RefreshExtensions(IPackage package, IPackageVersion version) { // For now packageInfo, package and packageVersion will all be null when there are multiple packages selected. // This way no single select UI will be displayed for multi-select. We might handle it differently in the future in a new story var packageInfo = version?.packageInfo; PackageManagerExtensions.ExtensionCallback(() => { foreach (var extension in PackageManagerExtensions.Extensions) { extension.OnPackageSelectionChange(packageInfo); } }); m_ExtensionManager.SendPackageSelectionChangedEvent(package, version); }
private void OnProcessAddResult(IOperation operation, Request <PackageInfo> request) { var packageInfo = request.Result; var specialUniqueId = (operation as UpmAddOperation)?.specialUniqueId; m_UpmCache.SetInstalledPackageInfo(packageInfo, !string.IsNullOrEmpty(specialUniqueId)); PackageManagerExtensions.ExtensionCallback(() => { foreach (var extension in PackageManagerExtensions.Extensions) { extension.OnPackageAddedOrUpdated(packageInfo); } }); // do a list offline to refresh all the dependencies List(true); }
private void OnProcessRemoveResult(RemoveRequest request) { var installedPackage = m_UpmCache.GetInstalledPackageInfo(request.PackageIdOrName); if (installedPackage == null) { return; } m_UpmCache.RemoveInstalledPackageInfo(installedPackage.name); PackageManagerExtensions.ExtensionCallback(() => { foreach (var extension in PackageManagerExtensions.Extensions) { extension.OnPackageRemoved(installedPackage); } }); // do a list offline to refresh all the dependencies List(true); }
public PackageDetails() { ResolveDependencies(); var root = m_ResourceLoader.GetTemplate("PackageDetails.uxml"); Add(root); root.StretchToParentSize(); cache = new VisualElementCache(root); PackageManagerExtensions.ExtensionCallback(() => { foreach (var extension in PackageManagerExtensions.Extensions) { customContainer.Add(extension.CreateExtensionUI()); } }); scrollView.verticalScroller.valueChanged += OnDetailScroll; scrollView.RegisterCallback <GeometryChangedEvent>(RecalculateFillerHeight); detail.RegisterCallback <GeometryChangedEvent>(RecalculateFillerHeight); }
static UpmGitExtensionUI() { PackageManagerExtensions.RegisterExtension(new UpmGitExtensionUI()); }
private static void Register() => PackageManagerExtensions.RegisterExtension(new PackageUpdaterInjector());
static Extension() { PackageManagerExtensions.RegisterExtension(new ToolbarExtension()); PackageManagerExtensions.RegisterExtension(new MenuExtensions()); }
static ValidationSuiteExtension() { PackageManagerExtensions.RegisterExtension(new ValidationSuiteExtension()); }
static DocumentationExtension() { PackageManagerExtensions.RegisterExtension(new DocumentationExtension()); }
static PackageManagerUpdateAllUtility() { PackageManagerExtensions.RegisterExtension(new PmUpdateAllBtnExtension()); }
private static void RegisterExtension() => PackageManagerExtensions.RegisterExtension(new PackageHubExtension());
static SamplesLinkPackageManagerExtension() { PackageManagerExtensions.RegisterExtension(new SamplesLinkPackageManagerExtension()); }
static DocGeneratorPackageMangerExtension() { PackageManagerExtensions.RegisterExtension(new DocGeneratorPackageMangerExtension()); }
//--------------------------------------------------------------------------------------------------------------------- static PackageDebugExtension() { PackageManagerExtensions.RegisterExtension(new PackageDebugExtension()); }
static UPMToolExtension() { PackageManagerExtensions.RegisterExtension(new UPMToolExtension()); }