docs.unity3d.com
    Show / Hide Table of Contents

    Interface IProject

    This class contains all the information pertaining to a cloud project.

    Namespace: Unity.Cloud.Assets
    Syntax
    public interface IProject

    Properties

    Id

    The project ID.

    Declaration
    ProjectId Id { get; }
    Property Value
    Type Description
    ProjectId

    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

    OrganizationId

    The id of the organization that owns this project.

    Declaration
    OrganizationId OrganizationId { get; }
    Property Value
    Type Description
    OrganizationId

    Methods

    CountAssetsAsync(IAssetSearchFilter, AggregationParameters, CancellationToken)

    Counts the number of assets which match the search filter.

    Declaration
    Task<Aggregation> CountAssetsAsync(IAssetSearchFilter assetSearchFilter, AggregationParameters parameters, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    IAssetSearchFilter assetSearchFilter

    A search filter.

    AggregationParameters parameters

    The parameters for the count.

    CancellationToken cancellationToken

    The cancellation token.

    Returns
    Type Description
    Task<Aggregation>

    A task whose result is the asset count.

    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

    The cancellation token.

    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

    The cancellation token.

    Returns
    Type Description
    Task<IAssetCollection>

    A task whose result is the newly created collection.

    DeleteAssetAsync(IAsset, CancellationToken)

    Deletes an asset.

    Declaration
    Task DeleteAssetAsync(IAsset asset, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    IAsset asset

    The asset to delete.

    CancellationToken cancellationToken

    The cancellation token.

    Returns
    Type Description
    Task

    A task with no result.

    DeleteCollectionAsync(CollectionPath, CancellationToken)

    Deletes a collection.

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

    The cancellation token.

    Returns
    Type Description
    Task

    A task with no result.

    GetAssetAsync(AssetId, Int32, CancellationToken)

    Retrieves an asset by its ID and version.

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

    The id of the asset.

    Int32 assetVersion

    The version of the asset.

    CancellationToken cancellationToken

    The cancellation token.

    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

    The cancellation token.

    Returns
    Type Description
    Task<IAssetCollection>

    A task whose result is the requested collection.

    LinkAssetAsync(IAsset, CancellationToken)

    Creates a reference between an asset and the project.

    Declaration
    Task LinkAssetAsync(IAsset asset, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    IAsset asset

    The asset to link to.

    CancellationToken cancellationToken

    The cancellation token.

    Returns
    Type Description
    Task

    A task with no result.

    ListCollectionsAsync(CancellationToken)

    Returns the collections in the project.

    Declaration
    Task<IEnumerable<IAssetCollection>> ListCollectionsAsync(CancellationToken cancellationToken)
    Parameters
    Type Name Description
    CancellationToken cancellationToken

    The cancellation token.

    Returns
    Type Description
    Task<IEnumerable<IAssetCollection>>

    A task whose result is an enumeration of IAssetCollection.

    SearchAssetsAsync(IAssetSearchFilter, Pagination, CancellationToken)

    Searches the project for assets which match the search filter.

    Declaration
    IAsyncEnumerable<IAsset> SearchAssetsAsync(IAssetSearchFilter assetSearchFilter, Pagination pagination, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    IAssetSearchFilter assetSearchFilter

    A search filter.

    Pagination pagination

    The range and ordering of assets to retrieve.

    CancellationToken cancellationToken

    The cancellation token.

    Returns
    Type Description
    IAsyncEnumerable<IAsset>

    A task whose result is an async enumeration of IAsset.

    UnlinkAssetAsync(IAsset, CancellationToken)

    Removes the reference between an asset and the project.

    Declaration
    Task UnlinkAssetAsync(IAsset asset, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    IAsset asset

    The asset to unlink.

    CancellationToken cancellationToken

    The cancellation token.

    Returns
    Type Description
    Task

    A task with no result.

    Back to top
    Terms of use
    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