docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Interface IAssetProject

    This class contains all the information about a cloud project.

    Namespace: Unity.Cloud.Assets
    Assembly: Unity.Cloud.Assets.dll
    Syntax
    public interface IAssetProject

    Properties

    Descriptor

    The descriptor of the project.

    Declaration
    ProjectDescriptor Descriptor { get; }
    Property Value
    Type Description
    ProjectDescriptor

    Metadata

    The project metadata.

    Declaration
    IDeserializable Metadata { get; set; }
    Property Value
    Type Description
    IDeserializable

    Name

    The project name.

    Declaration
    string Name { get; set; }
    Property Value
    Type Description
    string

    Methods

    CreateAssetAsync(IAssetCreation, CancellationToken)

    Creates an asset.

    Declaration
    Task<IAsset> CreateAssetAsync(IAssetCreation assetCreation, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    IAssetCreation assetCreation

    The object containing all the necessary information to create the asset.

    CancellationToken cancellationToken

    A token that can be used to cancel the request.

    Returns
    Type Description
    Task<IAsset>

    A task whose result is the new asset.

    CreateCollectionAsync(IAssetCollectionCreation, CancellationToken)

    Creates a collection.

    Declaration
    Task<IAssetCollection> CreateCollectionAsync(IAssetCollectionCreation assetCollectionCreation, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    IAssetCollectionCreation assetCollectionCreation

    The object containing the necessary information to create a collection.

    CancellationToken cancellationToken

    A token that can be used to cancel the request.

    Returns
    Type Description
    Task<IAssetCollection>

    A task whose result is the newly created collection.

    DeleteCollectionAsync(CollectionPath, CancellationToken)

    Deletes a collection.

    Declaration
    Task DeleteCollectionAsync(CollectionPath collectionPath, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    CollectionPath collectionPath
    CancellationToken cancellationToken

    A token that can be used to cancel the request.

    Returns
    Type Description
    Task

    A task with no result.

    GetAssetAsync(AssetId, string, CancellationToken)

    Retrieves an asset by its ID and label.

    Declaration
    Task<IAsset> GetAssetAsync(AssetId assetId, string label, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    AssetId assetId

    The id of the asset.

    string label

    The label associated to the asset version.

    CancellationToken cancellationToken

    A token that can be used to cancel the request.

    Returns
    Type Description
    Task<IAsset>

    A task whose result is the requested asset.

    GetAssetAsync(AssetId, CancellationToken)

    Retrieves an asset by its ID.

    Declaration
    Task<IAsset> GetAssetAsync(AssetId assetId, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    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 the asset with its default version.

    GetAssetAsync(AssetId, AssetVersion, CancellationToken)

    Retrieves an asset by its ID and version.

    Declaration
    Task<IAsset> GetAssetAsync(AssetId assetId, AssetVersion assetVersion, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    AssetId assetId

    The id of the asset.

    AssetVersion assetVersion

    The version 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 the requested asset.

    GetCollectionAsync(CollectionPath, CancellationToken)

    Returns the collection at the specified path.

    Declaration
    Task<IAssetCollection> GetCollectionAsync(CollectionPath collectionPath, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    CollectionPath collectionPath

    The path to the collection.

    CancellationToken cancellationToken

    A token that can be used to cancel the request.

    Returns
    Type Description
    Task<IAssetCollection>

    A task whose result is the requested collection.

    GroupAndCountAssets()

    Returns a builder to create a query to count a project's IAsset.

    Declaration
    GroupAndCountAssetsQueryBuilder GroupAndCountAssets()
    Returns
    Type Description
    GroupAndCountAssetsQueryBuilder

    An GroupAndCountAssetsQueryBuilder.

    LinkAssetsAsync(ProjectDescriptor, IEnumerable<AssetId>, CancellationToken)

    Links the assets to the project.

    Declaration
    Task LinkAssetsAsync(ProjectDescriptor sourceProjectDescriptor, IEnumerable<AssetId> assetIds, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    ProjectDescriptor sourceProjectDescriptor

    The id of the project the assets come from.

    IEnumerable<AssetId> assetIds

    The ids of assets to link.

    CancellationToken cancellationToken

    A token that can be used to cancel the request.

    Returns
    Type Description
    Task

    A task with no result.

    QueryAssetReferences(AssetId)

    Returns an object that can be used to query asset references.

    Declaration
    AssetReferenceQueryBuilder QueryAssetReferences(AssetId assetId)
    Parameters
    Type Name Description
    AssetId assetId

    The id of the asset to query.

    Returns
    Type Description
    AssetReferenceQueryBuilder

    A AssetReferenceQueryBuilder.

    QueryAssets()

    Returns a builder to create a query to search a project's IAsset.

    Declaration
    AssetQueryBuilder QueryAssets()
    Returns
    Type Description
    AssetQueryBuilder

    An AssetQueryBuilder.

    QueryCollections()

    Returns a builder to create a query to search a project's IAssetCollection.

    Declaration
    CollectionQueryBuilder QueryCollections()
    Returns
    Type Description
    CollectionQueryBuilder

    A CollectionQueryBuilder.

    QueryTransformations()

    Returns an object that can be used to query transformations.

    Declaration
    TransformationQueryBuilder QueryTransformations()
    Returns
    Type Description
    TransformationQueryBuilder

    A TransformationQueryBuilder.

    UnlinkAssetsAsync(IEnumerable<AssetId>, CancellationToken)

    Unlinks the assets from the project.

    Declaration
    Task UnlinkAssetsAsync(IEnumerable<AssetId> assetIds, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    IEnumerable<AssetId> assetIds

    The ids of 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.

    Extension Methods

    ProjectExtensions.CountAssetsAsync(IAssetProject, IAssetSearchFilter, CancellationToken)
    ProjectExtensions.GetAssetWithLatestVersionAsync(IAssetProject, AssetId, CancellationToken)
    ProjectExtensions.LinkAssetsAsync(IAssetProject, ProjectDescriptor, IEnumerable<IAsset>, CancellationToken)
    ProjectExtensions.ListCollectionsAsync(IAssetProject, Range, CancellationToken)
    ProjectExtensions.UnlinkAssetsAsync(IAssetProject, IEnumerable<IAsset>, CancellationToken)
    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)