Table of Contents

Class PackageSelfUpdater

Self updater for VPM based packages.

public class PackageSelfUpdater
Inheritance
PackageSelfUpdater
Inherited Members
Extension Methods

Constructors

PackageSelfUpdater(Assembly, string, string)

Create a new instance of PackageSelfUpdater.

public PackageSelfUpdater(Assembly assembly, string listingsID, string listingsURL)

Parameters

assembly Assembly

The assembly contained in the package.

listingsID string

The ID of the listings repository.

listingsURL string

The URL of the listings repository.

PackageSelfUpdater(PackageInfo, string, string)

Create a new instance of PackageSelfUpdater.

public PackageSelfUpdater(UnityEditor.PackageManager.PackageInfo packageInfo, string listingsID, string listingsURL)

Parameters

packageInfo PackageInfo

The package info.

listingsID string

The ID of the listings repository.

listingsURL string

The URL of the listings repository.

Properties

AvailableVersion

The available version of the package.

public string AvailableVersion { get; }

Property Value

string

CurrentVersion

The current version of the package.

public string CurrentVersion { get; }

Property Value

string

EnableSelfCheck

Whether to enable self-check for updates.

public bool EnableSelfCheck { get; set; }

Property Value

bool

IsInstalledManually

Whether the package is installed manually, not via VPM tools such as VCC.

public bool IsInstalledManually { get; }

Property Value

bool

PackageName

The package name.

public string PackageName { get; }

Property Value

string

SelfInstance

The self instance of PackageSelfUpdater, which handles the self-update of the package containing this class.

public static PackageSelfUpdater SelfInstance { get; }

Property Value

PackageSelfUpdater

Methods

CheckInstallation()

Check the installation status.

public void CheckInstallation()

CheckInstallationInBackground()

Check the installation status in background.

public void CheckInstallationInBackground()

ConfirmAndUpdate()

Update the package.

public void ConfirmAndUpdate()

Remarks

This method requires user interaction.

DrawUpdateNotifier()

Draw the update notifier to anywhere you want. This must be called inside an editor GUI block.

public void DrawUpdateNotifier()

ResolveInstallation()

Migrate to use VPM tools and update the package.

public void ResolveInstallation()

Remarks

This method requires user interaction.

Events

OnVersionRefreshed

Event triggered when the version is refreshed.

public event Action OnVersionRefreshed

Event Type

Action