docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Use case: Update an annotation

    Before you start

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

    1. Verify Permissions: Confirm that you have the necessary rights to modify the annotation. Typically, you'll need to be the original creator of the annotation or have appropriate administrative permissions.
    2. Identify the Annotation: Locate the specific annotation you want to update. You'll need its unique identifier to perform this action.
    3. Determine Required Changes: Clearly identify which aspects of the annotation need to be updated. Keep in mind that there are restrictions for the text content:
      • Must be less than 10,000 characters
      • Cannot be empty or contain only whitespace characters
      • Cannot start or end with whitespace characters

    How do I...?

    Update the content of an annotation

    To modify the text or main content of an existing annotation:

    1. Obtain the Project Identifier: Ensure you have the correct project identifier (GUID) for the project.
    2. Obtain the Annotation Identifier: Ensure you have the correct annotation identifier (GUID) for the annotation to amend.
    3. Modify the Content: Update the annotation content with new text.
    4. Handle Any Errors: Implement the appropriate error handling to manage cases where the update might fail.

    Example:

    var text = "Updated annotation content with new information.";
    
    await annotationManagement.UpdateAnnotationAsync(
        projectId: projectId,
        annotationId: annotationId,
        text: text,
        cancellationToken: cancellationToken);
    

    For more information on managing annotations, see the documentation on creating annotations and searching annotations.

    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)