docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Use case: Unsubscribe a user from a thread

    Before you start

    Before you unsubscribe a user from a thread, ensure you have completed the following prerequisites:

    1. Verify Permissions: Confirm that you have the necessary rights to manage thread subscriptions. Typically, users can unsubscribe themselves, while administrators might be able to manage subscriptions for others.
    2. Identify the Thread: You must have a valid thread identifier for the thread from which you want to unsubscribe the user. Threads are typically identified by their root annotation ID or a dedicated thread ID.
    3. Identify the User: Determine which user should be unsubscribed from the thread. This could be the current user or another user (if you have administrative access).
    4. Understand Unsubscription Effects: Be aware that unsubscribing from a thread means the user will no longer receive notifications about thread activity, such as new replies, status changes, or mentions.
    5. Set Up SDK Environment: Ensure your Unity environment is properly configured with the Collaboration SDK to interact with the thread subscription system.

    How do I...?

    Unsubscribe the current user from a thread

    To unsubscribe the currently authenticated user from a specific thread:

    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 root annotation identifying the thread.
    3. Execute the Unsubscription: Use the SDK to unsubscribe the current user to the thread.
    4. Update UI: Modify your interface to indicate the user is now unsubscribed.

    Example:

    await annotationManagement.UnsubscribeFromThreadAsync(
        projectId: projectId,
        annotationId: annotationId,
        cancellationToken: cancellationToken);
    

    For more information on working with thread subscriptions, see the documentation on checking user subscription status and subscribing users to threads.

    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)