Documentation

Unity Engine


Unity Engine


Resolve()

Forces the Package Manager to resolve the project's packages, reinstalling any altered or missing package and removing extraneous packages.
Read time 1 minuteLast updated a month ago

Definition

public static void Resolve()

Remarks

Forces the Package Manager to resolve the project's packages to ensure they are up-to-date and unchanged. If the packages are already up-to-date, no event is raised.
Note: Make sure any other Client operations complete before calling this method. For more information, refer to the note on the Client class reference page.

Examples

using UnityEngine;using UnityEditor.PackageManager;using UnityEditor;[ExecuteInEditMode]public class PackageManagerClientResolveExample : MonoBehaviour{ void Start() { Debug.Log("Client.Resolve example..."); // Optionally listen for package events, raised if packages are getting added or removed Events.registeringPackages += OnPackagesRegistering; Events.registeredPackages += OnPackagesRegistered; ResolvePackages(); } void ResolvePackages() { // Trigger resolution Client.Resolve(); } void OnPackagesRegistering(PackageRegistrationEventArgs args) { } void OnPackagesRegistered(PackageRegistrationEventArgs args) { }}