docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class ProjectExtensions

    Inheritance
    object
    ProjectExtensions
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.Cloud.Assets
    Assembly: Unity.Cloud.Assets.dll
    Syntax
    public static class ProjectExtensions

    Methods

    CountAssetsAsync(IAssetProject, IAssetSearchFilter, CancellationToken)

    Returns the total count of assets in the specified projects based on the provided criteria.

    Declaration
    public static Task<int> CountAssetsAsync(this IAssetProject assetProject, IAssetSearchFilter assetSearchFilter, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    IAssetProject assetProject

    The IAssetProject.

    IAssetSearchFilter assetSearchFilter

    The filter specifying the search criteria. Can be null.

    CancellationToken cancellationToken

    A token that can be used to cancel the request.

    Returns
    Type Description
    Task<int>

    A task whose result is an asset count.

    GetAssetWithLatestVersionAsync(IAssetProject, AssetId, CancellationToken)

    Returns the latest version of the asset.

    Declaration
    public static Task<IAsset> GetAssetWithLatestVersionAsync(this IAssetProject assetProject, AssetId assetId, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    IAssetProject assetProject

    The project to query.

    AssetId assetId

    The id of the asset.

    CancellationToken cancellationToken

    A token that can be used to cancel the request.

    Returns
    Type Description
    Task<IAsset>

    A task whose result is an IAsset.

    LinkAssetsAsync(IAssetProject, ProjectDescriptor, IEnumerable<IAsset>, CancellationToken)

    Links the assets to the project.

    Declaration
    public static Task LinkAssetsAsync(this IAssetProject assetProject, ProjectDescriptor sourceProjectDescriptor, IEnumerable<IAsset> assets, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    IAssetProject assetProject

    The target project.

    ProjectDescriptor sourceProjectDescriptor

    The id of the project that is common to the assets.

    IEnumerable<IAsset> assets

    The assets to link.

    CancellationToken cancellationToken

    A token that can be used to cancel the request.

    Returns
    Type Description
    Task

    A task with no result.

    ListCollectionsAsync(IAssetProject, Range, CancellationToken)

    Returns the collections of the project.

    Declaration
    public static IAsyncEnumerable<IAssetCollection> ListCollectionsAsync(this IAssetProject assetProject, Range range, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    IAssetProject assetProject

    The IAssetProject.

    Range range

    The range of results to return.

    CancellationToken cancellationToken

    A token that can be used to cancel the request.

    Returns
    Type Description
    IAsyncEnumerable<IAssetCollection>

    UnlinkAssetsAsync(IAssetProject, IEnumerable<IAsset>, CancellationToken)

    Unlinks the assets from the project.

    Declaration
    public static Task UnlinkAssetsAsync(this IAssetProject assetProject, IEnumerable<IAsset> assets, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    IAssetProject assetProject

    The target project.

    IEnumerable<IAsset> assets

    The assets to unlink from the project.

    CancellationToken cancellationToken

    A token that can be used to cancel the request.

    Returns
    Type Description
    Task

    A task with no result.

    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)