docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Use case: Reply to an annotation

    Before you start

    Before you reply to an annotation, ensure you have completed the following prerequisites:

    1. Verify Permissions: Check that you have the necessary permissions to create replies to annotations in your project. This typically requires at least basic contributor access.
    2. Identify the Parent Annotation: Locate the specific annotation to which you want to reply. You'll need its unique identifier to create a properly linked response.
    3. Understand Threading Model: Be aware of how annotation replies work in the system. Replies create a threaded conversation attached to the original annotation, facilitating organized discussions.
    4. Set Up SDK Environment: Ensure your Unity environment is properly configured with the Collaboration SDK to interact with the annotation system.
    5. Consider Notification Impact: Be aware that creating a reply may trigger notifications to other users who are subscribed to the thread or the original annotation.

    How do I...?

    Reply to an existing annotation

    To create a reply to an annotation, follow these steps:

    1. Get the Parent Annotation ID: Identify the unique ID of the annotation to which you want to respond. Note that what makes of an annotation a reply is the rootAnnotationId.
    2. Prepare the Project Identifier: Ensure you have the correct project identifier (GUID) for the project you want to search for.
    3. Prepare Asset Identifier: Ensure you have the correct and complete asset identifier (GUID) for the asset you want to search by.
    4. Create Reply Content: Prepare the content of your reply as a new Annotation. This typically includes text, but may support additional formatting depending on the system.
    5. Submit the Reply: Use the SDK to create a new reply linked to the parent annotation.
    6. Handle Response: Verify that the reply was successfully created and handle any errors appropriately.
    7. Update UI: If your application has a user interface displaying the annotation thread, refresh it to include the newly created reply.

    Example:

    var projectId = "example-project-id"; // Your project ID
    var assetId = "example-asset-id"; // ID of the asset to which the annotation is attached
    var rootAnnotationId = "example-root-annotation-id"; // ID of the original annotation
    
    AnnotationId result = await annotationManagement.CreateAnnotationAsync(
      projectId: projectId,
      assetId: assetId,
      rootAnnotationId: rootAnnotationId,
      ...
      );
    

    Include additional context in replies

    To make your replies more informative and effective:

    1. Reference Specific Elements: If your reply addresses a particular part of the original annotation, consider including clear references.
    2. Add Attachments: If supported, enhance your reply with relevant files or images to better illustrate your point.
    3. Add Mentions: Mentions allow users to notify each other directly. They are encoded into the text field using the format:
    :user[<userName>]{#<userId>}
    
    Note

    Curly and square brackets are part of the format, angle brackets indicate values to be substituted in this template. Where userName is a display name to use when rendering the mention, and userId is the Genesis ID of the user to notify. The mentioned user must be a member of the Project where the Annotation is created to receive the mention.

    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)