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

    CacheConfiguration

    The caching configuration for the project.

    Declaration
    AssetProjectCacheConfiguration CacheConfiguration { get; }
    Property Value
    Type Description
    AssetProjectCacheConfiguration

    Descriptor

    The descriptor of the project.

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

    HasCollection

    Whether the project has any collections

    Declaration
    [Obsolete("Use IAssetProperties.HasCollection instead.")]
    bool HasCollection { get; }
    Property Value
    Type Description
    bool

    Metadata

    The project metadata.

    Declaration
    [Obsolete("Use IAssetProperties.Metadata instead.")]
    IDeserializable Metadata { get; set; }
    Property Value
    Type Description
    IDeserializable

    Name

    The project name.

    Declaration
    [Obsolete("Use IAssetProperties.Name instead.")]
    string Name { get; set; }
    Property Value
    Type Description
    string

    Methods

    CountAssetsAsync(CancellationToken)

    Returns the number of assets in the project.

    Declaration
    Task<int> CountAssetsAsync(CancellationToken cancellationToken)
    Parameters
    Type Name Description
    CancellationToken cancellationToken

    A token that can be used to cancel the request.

    Returns
    Type Description
    Task<int>

    A task whose result is the number of assets in the project.

    CountCollectionsAsync(CancellationToken)

    Returns the number of collections in the project.

    Declaration
    Task<int> CountCollectionsAsync(CancellationToken cancellationToken)
    Parameters
    Type Name Description
    CancellationToken cancellationToken

    A token that can be used to cancel the request.

    Returns
    Type Description
    Task<int>

    A task whose result is the number of collections in the project.

    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.

    CreateAssetLiteAsync(IAssetCreation, CancellationToken)

    Creates an asset.

    Declaration
    Task<AssetDescriptor> CreateAssetLiteAsync(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<AssetDescriptor>

    A task whose result is the created asset descriptor.

    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.

    CreateCollectionLiteAsync(IAssetCollectionCreation, CancellationToken)

    Creates a collection.

    Declaration
    Task<CollectionDescriptor> CreateCollectionLiteAsync(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<CollectionDescriptor>

    A task whose result is the new CollectionDescriptor.

    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
    [Obsolete("Use QueryAssetVersions instead.")]
    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.

    GetPropertiesAsync(CancellationToken)

    Returns the properties of the project.

    Declaration
    Task<AssetProjectProperties> GetPropertiesAsync(CancellationToken cancellationToken)
    Parameters
    Type Name Description
    CancellationToken cancellationToken

    A token that can be used to cancel the request.

    Returns
    Type Description
    Task<AssetProjectProperties>

    A task whose result is the AssetProjectProperties of the project.

    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.

    QueryAssetVersions(AssetId)

    Returns an object that can be used to query the asset's versions.

    Declaration
    VersionQueryBuilder QueryAssetVersions(AssetId assetId)
    Parameters
    Type Name Description
    AssetId assetId

    The id of the asset to query.

    Returns
    Type Description
    VersionQueryBuilder

    A VersionQueryBuilder.

    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.

    RefreshAsync(CancellationToken)

    Fetches the latest changes.

    Declaration
    Task RefreshAsync(CancellationToken cancellationToken)
    Parameters
    Type Name Description
    CancellationToken cancellationToken

    A token that can be used to cancel the request.

    Returns
    Type Description
    Task

    A task with no result.

    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.

    WithCacheConfigurationAsync(AssetProjectCacheConfiguration, CancellationToken)

    Returns an asset project configured with the specified caching configuration.

    Declaration
    Task<IAssetProject> WithCacheConfigurationAsync(AssetProjectCacheConfiguration assetProjectCacheConfiguration, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    AssetProjectCacheConfiguration assetProjectCacheConfiguration

    The caching configuration for the project.

    CancellationToken cancellationToken

    A token that can be used to cancel the request.

    Returns
    Type Description
    Task<IAssetProject>

    A task whose result is an IAssetProject with cached values specified by the caching configurations.

    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 © 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)