docs.unity3d.com
    Show / Hide Table of Contents

    Interface IAnnotationDataSource

    An interface that represents the data source for a specific scene and lets you create and update annotations.

    Namespace: Unity.Cloud.Annotation
    Syntax
    public interface IAnnotationDataSource

    Methods

    CreateCommentAsync(Guid, ICommentCreation)

    Creates an IComment associated with the specified topic.

    Declaration
    Task<IComment> CreateCommentAsync(Guid topicId, ICommentCreation commentCreation)
    Parameters
    Type Name Description
    Guid topicId

    The ID of the topic you want to comment.

    ICommentCreation commentCreation

    The ICommentCreation object that contains the necessary information to create the comment.

    Returns
    Type Description
    Task<IComment>

    A task whose result is the created comment.

    CreateTopicAsync(ITopicCreation)

    Creates and adds an ITopic to the data source.

    Declaration
    Task<ITopic> CreateTopicAsync(ITopicCreation topicCreation)
    Parameters
    Type Name Description
    ITopicCreation topicCreation

    The ITopicCreation object that contains the necessary information to create the topic.

    Returns
    Type Description
    Task<ITopic>

    A task whose result is the created topic.

    EditCommentAsync(ICommentUpdate)

    Edits an IComment.

    Declaration
    Task<IComment> EditCommentAsync(ICommentUpdate commentUpdate)
    Parameters
    Type Name Description
    ICommentUpdate commentUpdate

    The ICommentUpdate object that contains the necessary information to update the comment.

    Returns
    Type Description
    Task<IComment>

    A task whose result is the edited comment.

    GetCommentsAsync(Guid)

    Returns the collection of ITopics from the scene associated with the data source.

    Declaration
    Task<IEnumerable<IComment>> GetCommentsAsync(Guid topicId)
    Parameters
    Type Name Description
    Guid topicId

    The ID of the topic whose comments you want to fetch.

    Returns
    Type Description
    Task<IEnumerable<IComment>>

    A task whose result is the collection of fetched comments.

    GetSceneCommentsAsync()

    Returns the collection of IComments from the scene associated with the data source.

    Declaration
    Task<IEnumerable<IComment>> GetSceneCommentsAsync()
    Returns
    Type Description
    Task<IEnumerable<IComment>>

    A task whose result is the collection of fetched comments.

    GetSceneTopicsAsync()

    Returns the collection of ITopics from the repository.

    Declaration
    Task<IEnumerable<ITopic>> GetSceneTopicsAsync()
    Returns
    Type Description
    Task<IEnumerable<ITopic>>

    A task whose result is the collection of fetched topics.

    MarkAllAsReadAsync()

    Marks the scene's topics and comments as read.

    Declaration
    Task MarkAllAsReadAsync()
    Returns
    Type Description
    Task

    A task with no result.

    MarkCommentAsReadAsync(Guid)

    Marks the specified comment as read.

    Declaration
    Task MarkCommentAsReadAsync(Guid commentId)
    Parameters
    Type Name Description
    Guid commentId

    The ID of the comment you want to mark as read.

    Returns
    Type Description
    Task

    A task with no result.

    MarkCommentsAsReadAsync(ICommentsRead)

    Marks the specified topic's comments as read.

    Declaration
    Task MarkCommentsAsReadAsync(ICommentsRead commentsRead)
    Parameters
    Type Name Description
    ICommentsRead commentsRead

    The collection of comments you want to mark as read.

    Returns
    Type Description
    Task

    A task with no result.

    MarkTopicAsReadAsync(Guid)

    Marks the specified topic as read.

    Declaration
    Task MarkTopicAsReadAsync(Guid topicId)
    Parameters
    Type Name Description
    Guid topicId

    The ID of the topic you want to mark as read.

    Returns
    Type Description
    Task

    A task with no result.

    MarkTopicsAsReadAsync(ITopicsRead)

    Marks all specified topics as read.

    Declaration
    Task MarkTopicsAsReadAsync(ITopicsRead topicsRead)
    Parameters
    Type Name Description
    ITopicsRead topicsRead

    The collection of topics you want to mark as read.

    Returns
    Type Description
    Task

    A task with no result.

    RemoveCommentAsync(Guid)

    Removes an IComment from the data source.

    Declaration
    Task RemoveCommentAsync(Guid commentId)
    Parameters
    Type Name Description
    Guid commentId

    The ID of the comment you want to remove.

    Returns
    Type Description
    Task

    A task with no result.

    RemoveTopicAsync(Guid)

    Removes an ITopic from the data source.

    Declaration
    Task RemoveTopicAsync(Guid topicId)
    Parameters
    Type Name Description
    Guid topicId

    The ID of the topic you want to delete.

    Returns
    Type Description
    Task

    A task with no result.

    ResolveTopicAsync(Guid)

    Sets the TopicState of the specified topic to Resolved.

    Declaration
    Task<ITopic> ResolveTopicAsync(Guid topicId)
    Parameters
    Type Name Description
    Guid topicId

    The ID of the topic you want to resolve.

    Returns
    Type Description
    Task<ITopic>

    A task whose result is the resolved topic.

    UnresolveTopicAsync(Guid)

    Sets the TopicState of the specified topic to NeedsResolution.

    Declaration
    Task<ITopic> UnresolveTopicAsync(Guid topicId)
    Parameters
    Type Name Description
    Guid topicId

    The ID of the topic you want to unresolve.

    Returns
    Type Description
    Task<ITopic>

    A task whose result is the unresolved topic.

    UpdateTopicAsync(ITopicUpdate)

    Updates an ITopic associated with the data source.

    Declaration
    Task<ITopic> UpdateTopicAsync(ITopicUpdate topicUpdate)
    Parameters
    Type Name Description
    ITopicUpdate topicUpdate

    The ITopicUpdate object that contains the necessary information to update the topic.

    Returns
    Type Description
    Task<ITopic>

    A task whose result is the updated topic.

    Events

    CommentReceived

    Calls the methods in its invocation list when you receive an IComment from the data source.

    Declaration
    event Action<IComment> CommentReceived
    Event Type
    Type Description
    Action<IComment>

    CommentRemoved

    Calls the methods in its invocation list when you remove an IComment from the data source.

    Declaration
    event Action<Guid> CommentRemoved
    Event Type
    Type Description
    Action<Guid>

    NotificationError

    Calls the methods in its invocation list when a notification error is raised.

    Declaration
    event Action NotificationError
    Event Type
    Type Description
    Action

    TopicReceived

    Calls the methods in its invocation list when you receive an ITopic from the data source.

    Declaration
    event Action<ITopic> TopicReceived
    Event Type
    Type Description
    Action<ITopic>

    TopicRemoved

    Calls the methods in its invocation list when you remove an ITopic from the data source.

    Declaration
    event Action<ITopicDeletion> TopicRemoved
    Event Type
    Type Description
    Action<ITopicDeletion>
    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