docs.unity3d.com
    Show / Hide Table of Contents

    Interface IAssetCollection

    This object contains the information pertaining to an asset collection.

    Namespace: Unity.Cloud.Assets
    Syntax
    public interface IAssetCollection

    Properties

    CatalogId

    The id of an associated catalog.

    Declaration
    string CatalogId { get; set; }
    Property Value
    Type Description
    String

    Description

    Describes the collection.

    Declaration
    string Description { get; }
    Property Value
    Type Description
    String

    Metadata

    Additional serialized information about the collection.

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

    Name

    The name of the collection.

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

    ParentPath

    The path to the parent collection; can be empty.

    Declaration
    CollectionPath ParentPath { get; }
    Property Value
    Type Description
    CollectionPath

    Methods

    AddAssetsAsync(IEnumerable<IAsset>, CancellationToken)

    Adds a set of asset references to the collection.

    Declaration
    Task AddAssetsAsync(IEnumerable<IAsset> assets, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    IEnumerable<IAsset> assets

    The assets to link to the collection.

    CancellationToken cancellationToken

    The cancellation token.

    Returns
    Type Description
    Task

    A task with no result.

    GetFullCollectionPath()

    Returns the full path to the collection.

    Declaration
    string GetFullCollectionPath()
    Returns
    Type Description
    String

    The path of the collection.

    MoveToNewPathAsync(CollectionPath, CancellationToken)

    Reparents the collection to a new path.

    Declaration
    Task MoveToNewPathAsync(CollectionPath newCollectionPath, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    CollectionPath newCollectionPath

    The new parent path.

    CancellationToken cancellationToken

    The cancellation token.

    Returns
    Type Description
    Task

    A task with no result.

    RemoveAssetsAsync(IEnumerable<IAsset>, CancellationToken)

    Removes a set of asset references from the collection.

    Declaration
    Task RemoveAssetsAsync(IEnumerable<IAsset> assets, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    IEnumerable<IAsset> assets

    The assets to unlink from the collection.

    CancellationToken cancellationToken

    The cancellation token.

    Returns
    Type Description
    Task

    A task with no result.

    SetDescription(String)

    Sets the Description of the collection.

    Declaration
    void SetDescription(string description)
    Parameters
    Type Name Description
    String description

    The description of the collection.

    Exceptions
    Type Condition
    ArgumentNullException

    This exception is thrown if the description is null or empty.

    SetName(String)

    Sets the Name of the collection.

    Declaration
    void SetName(string name)
    Parameters
    Type Name Description
    String name

    The name of the collection.

    Exceptions
    Type Condition
    ArgumentNullException

    This exception is thrown if the name is null or empty.

    UpdateAsync(CancellationToken)

    Synchronizes the local changes to the collection with the data source.

    Declaration
    Task UpdateAsync(CancellationToken cancellationToken)
    Parameters
    Type Name Description
    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