docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class AssetExtensions

    Inheritance
    object
    AssetExtensions
    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 AssetExtensions

    Methods

    GetPreviewDatasetAsync(IAsset, CancellationToken)

    Returns the Preview dataset for the asset.

    Declaration
    public static Task<IDataset> GetPreviewDatasetAsync(this IAsset asset, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    IAsset asset

    The asset to query.

    CancellationToken cancellationToken

    A token that can be used to cancel the request.

    Returns
    Type Description
    Task<IDataset>

    A task whose result is an IDataset.

    GetSourceDatasetAsync(IAsset, CancellationToken)

    Returns the Source dataset for the asset.

    Declaration
    public static Task<IDataset> GetSourceDatasetAsync(this IAsset asset, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    IAsset asset

    The asset to query.

    CancellationToken cancellationToken

    A token that can be used to cancel the request.

    Returns
    Type Description
    Task<IDataset>

    A task whose result is an IDataset.

    WithLatestVersionAsync(IAsset, CancellationToken)

    Returns the latest version of the asset.

    Declaration
    public static Task<IAsset> WithLatestVersionAsync(this IAsset asset, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    IAsset asset

    The asset to query.

    CancellationToken cancellationToken

    A token that can be used to cancel the request.

    Returns
    Type Description
    Task<IAsset>

    A task whose result is an IAsset.

    WithVersionAsync(IAsset, int, CancellationToken)

    Returns the version of the asset with the specified sequence number.

    Declaration
    public static Task<IAsset> WithVersionAsync(this IAsset asset, int frozenSequenceNumber, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    IAsset asset

    The asset to query.

    int frozenSequenceNumber

    The sequence number of the version of the asset to fetch.

    CancellationToken cancellationToken

    A token that can be used to cancel the request.

    Returns
    Type Description
    Task<IAsset>

    A task whose result is the IAsset with the frozen version attributed to the specified sequence number.

    Exceptions
    Type Condition
    NotFoundException

    If a version with the corresponding frozenSequenceNumber is not found.

    In This Article
    Back to top
    Copyright © 2024 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)