Class RequestJobManager
An editor class to manage requests to UnityEditor.PackageManager.Client This class will perform its operations in background while Unity is running.
Inheritance
Namespace: Unity.RenderStreaming.Editor
Syntax
public class RequestJobManager
Methods
CreateAddRequest(String, Action<Request<PackageInfo>>, Action<Request<PackageInfo>>)
Queue a job to create an AddRequest instance
Declaration
public static void CreateAddRequest(string packageName, Action<Request<PackageInfo>> onSuccess, Action<Request<PackageInfo>> onFail)
Parameters
Type | Name | Description |
---|---|---|
System.String | packageName | The name or ID of the package to add. If only the name is specified, the latest version of the package is installed. |
System.Action<Request<PackageInfo>> | onSuccess | Action which is executed if the request succeeded |
System.Action<Request<PackageInfo>> | onFail | Action which is executed if the request failed |
CreateListRequest(Boolean, Boolean, Action<Request<PackageCollection>>, Action<Request<PackageCollection>>)
Queue a job to create a ListRequest instance
Declaration
public static void CreateListRequest(bool offlineMode, bool includeIndirectIndependencies, Action<Request<PackageCollection>> onSuccess, Action<Request<PackageCollection>> onFail)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | offlineMode | Specifies whether or not the Package Manager requests the latest information about the project's packages from the remote Unity package registry. When offlineMode is true, the PackageInfo objects in the PackageCollection returned by the Package Manager contain information obtained from the local package cache, which could be out of date. |
System.Boolean | includeIndirectIndependencies | Set to true to include indirect dependencies in the PackageCollection returned by the Package Manager. Indirect dependencies include packages referenced in the manifests of project packages or in the manifests of other indirect dependencies. Set to false to include only the packages listed directly in the project manifest. |
System.Action<Request<PackageCollection>> | onSuccess | Action which is executed if the request succeeded |
System.Action<Request<PackageCollection>> | onFail | Action which is executed if the request failed |