docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Use case: Check a user subscription to a thread

    Before you start

    Before you check a user's subscription status to a thread, ensure you have completed the following prerequisites:

    1. Verify Permissions: Confirm that you have the necessary rights to query thread subscription information. This typically requires basic access permissions to the collaboration system.
    2. Identify the Thread: You must have a valid thread identifier to check subscription status. Threads are identified by their root annotation ID.
    3. Identify the User: Understand that the current user's subscription status will be checked.
    4. Understand Subscription Context: Be aware that thread subscriptions determine which users 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...?

    Check if the current user is subscribed to a thread

    To determine if the currently authenticated user is subscribed to 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. Query Subscription Status: Use the SDK to check the current user's subscription state.
    4. Update UI: Modify your interface to display whether the user is subscribed to the thread or not.

    Example:

    var result = await annotationManagement.IsSubscribedToThreadAsync(
        projectId: projectId,
        annotationId: annotationId,
        cancellationToken: cancellationToken);
        
    var isSubscribed = result.IsSubscribed;
    

    For more information on working with thread subscriptions, see the documentation on subscribing users to threads and unsubscribing 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)