docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Use case: Find replies to an annotation

    Before you start

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

    1. Verify Permissions: Check that you have the necessary access rights to view annotations and their replies within your project.
    2. Obtain the Annotation ID: Ensure you have the unique identifier of the parent annotation for which you want to find replies. This ID is essential for querying related responses.
    3. Understand the Relationship Model: Familiarize yourself with how annotation replies are organized in the system. Replies are typically linked to a parent annotation through a reference relationship.
    4. Set Up SDK Environment: Make sure your Unity Editor environment is properly configured with the Collaboration SDK to access annotation data.

    How do I...?

    Find all replies to a specific annotation

    To retrieve all replies associated with a particular annotation, follow these steps:

    1. Identify the Parent Annotation: Determine which annotation's replies you need to find. You'll need its unique identifier.
    2. Query for Replies: Use the SDK to fetch all replies linked to the parent annotation.
    3. Handle Empty Results: Implement appropriate handling for cases where no replies exist for the annotation.
    4. Process the Results: Format and display the retrieved replies in your application's user interface.

    Example:

    ReadRepliesResult result = await annotationManagement.ReadRepliesAsync(projectId, annotationId, cancellationToken: cancellationToken);
    

    Filter and sort annotation replies

    To refine the list of replies to retrieve:

    1. Apply Filtering Options: Use filtering parameters to narrow down the replies based on criteria such as:
      • Creation date range
      • Creator information
      • Content keywords
      • Annotation status ("All","Active","Sending","Draft")
    2. Sort Results: Organize replies in a meaningful order:
      • Chronological (newest/oldest first)
      • By user
      • By relevance (if supported)

    Implement pagination for large result sets

    When dealing with annotations that might have many replies:

    1. Set Page Size: Determine how many replies to retrieve per request.
    2. Implement Page Navigation: Add functionality to navigate through pages of replies.
    3. Track Position: Maintain the current position in the result set to enable seamless browsing.
    Note

    Pagination helps optimize performance when dealing with threads that contain many replies by loading only what is needed at any given time.

    For more comprehensive thread management, see the documentation on thread subscription and thread unsubscription.

    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)