docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Use case: Finalize an attachment in an annotation

    The finalization process of an attachment is to notify the server that the attachment's file content has been successfully uploaded. It is a necessary step before the attachment can be used in an annotation, only for attachments of type FileAttachment and SketchAttachment.

    Before you start

    Before you read an attachment, ensure you have completed the following prerequisites:

    1. Verify Permissions: Confirm that you have the necessary rights to modify annotations.
    2. Existing Annotation: You must have an existing annotation containing the attachment to finalize.
    3. Existing Attachment's identifier: You must have the ID of an existing attachment of type FileAttachment and SketchAttachment to finalize.

    How do I...?

    Finalize an attachment

    Invoke the FinalizeAnnotationAttachmentAsync method to finalize an attachment. The following input parameters are required:

    • projectId: The ID of the project.
    • annotationId: The ID of the annotation.
    • attachmentId: The ID of the attachment to finalize.
    • fileName: The name of the file to finalize.
    var fileAttachmentId = new AttachmentId("<file-attachment-id>");
    await User1Manager.AnnotationManagement.FinalizeAnnotationAttachmentAsync(projectId, annotationId, attachmentId, fileName);
    

    For more information on working with attachments, see the documentation on creating attachments, updating attachments and deleting attachments.

    See the API documentation for more details on the FinalizeAnnotationAttachmentAsync method.

    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)