Class RequestJobManager | Anime Toolbox | 0.3.1-preview
docs.unity3d.com
    Show / Hide Table of Contents

    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
    Object
    RequestJobManager
    Namespace: Unity.AnimeToolbox.Editor
    Syntax
    public static class RequestJobManager

    Methods

    CreateAddRequest(String, Action<Request<PackageInfo>>, Action<Request<PackageInfo>>)

    Queue a job to add a package dependency to the project.

    Declaration
    public static void CreateAddRequest(string packageName, Action<Request<PackageInfo>> onSuccess, Action<Request<PackageInfo>> onFail)
    Parameters
    Type Name Description
    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.

    Action<Request<PackageInfo>> onSuccess

    Action which is executed if the request succeeded

    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 list the packages the project depends on.

    Declaration
    public static void CreateListRequest(bool offlineMode, bool includeIndirectIndependencies, Action<Request<PackageCollection>> onSuccess, Action<Request<PackageCollection>> onFail)
    Parameters
    Type Name Description
    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.

    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.

    Action<Request<PackageCollection>> onSuccess

    Action which is executed if the request succeeded

    Action<Request<PackageCollection>> onFail

    Action which is executed if the request failed

    CreateRemoveRequest(String, Action, Action)

    Queue a job to removes a previously added package from the project.

    Declaration
    public static void CreateRemoveRequest(string packageName, Action onSuccess, Action onFail)
    Parameters
    Type Name Description
    String packageName

    The name or ID of the package to add.

    Action onSuccess

    Action which is executed if the request succeeded

    Action onFail

    Action which is executed if the request failed

    CreateSearchAllRequest(Boolean, Action<Request<PackageInfo[]>>, Action<Request<PackageInfo[]>>)

    Queue a job to search the Unity package registry for all packages compatible with the current Unity version.

    Declaration
    public static void CreateSearchAllRequest(bool offlineMode, Action<Request<PackageInfo[]>> onSuccess, Action<Request<PackageInfo[]>> onFail)
    Parameters
    Type Name Description
    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.

    Action<Request<PackageInfo[]>> onSuccess

    Action which is executed if the request succeeded

    Action<Request<PackageInfo[]>> onFail

    Action which is executed if the request failed

    CreateSearchRequest(String, Boolean, Action<Request<PackageInfo[]>>, Action<Request<PackageInfo[]>>)

    Queue a job to searches the Unity package registry for the given package.

    Declaration
    public static void CreateSearchRequest(string packageName, bool offlineMode, Action<Request<PackageInfo[]>> onSuccess, Action<Request<PackageInfo[]>> onFail)
    Parameters
    Type Name Description
    String packageName

    The name or ID of the package to add.

    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.

    Action<Request<PackageInfo[]>> onSuccess

    Action which is executed if the request succeeded

    Action<Request<PackageInfo[]>> onFail

    Action which is executed if the request failed

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023