docs.unity3d.com
    Show / Hide Table of Contents

    Class Room

    Represents a high level object room connected to the join and monitoring services

    Inheritance
    Object
    BaseRoom
    Room
    Inherited Members
    BaseRoom.RoomId
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Unity.Cloud.Presence.Runtime
    Syntax
    public class Room : BaseRoom

    Properties

    ConnectedParticipants

    The collection of participants currently connected to the Room. This data comes from IRoomMonitoring

    Declaration
    public IReadOnlyCollection<IParticipant> ConnectedParticipants { get; }
    Property Value
    Type Description
    IReadOnlyCollection<IParticipant>

    Methods

    JoinAsync(IRetryPolicy, CancellationToken)

    Makes the local participant Join this room instance The retry policy to execute the join Cancellation token that will try to cancel the operation

    Declaration
    public async Task JoinAsync(IRetryPolicy retryPolicy, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    IRetryPolicy retryPolicy
    CancellationToken cancellationToken
    Returns
    Type Description
    Task

    LeaveAsync()

    Leaves the room

    Declaration
    public async Task LeaveAsync()
    Returns
    Type Description
    Task

    StartMonitoringAsync(IRetryPolicy, CancellationToken)

    Start monitoring the room for connected participants The retry policy to execute the join Cancellation token that will try to cancel the operation

    Declaration
    public async Task StartMonitoringAsync(IRetryPolicy retryPolicy, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    IRetryPolicy retryPolicy
    CancellationToken cancellationToken
    Returns
    Type Description
    Task

    StopMonitoringAsync(IRetryPolicy, CancellationToken)

    Stop monitoring the room for connected participants The retry policy to execute the join Cancellation token that will try to cancel the operation

    Declaration
    public async Task StopMonitoringAsync(IRetryPolicy retryPolicy, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    IRetryPolicy retryPolicy
    CancellationToken cancellationToken
    Returns
    Type Description
    Task

    Events

    ParticipantAdded

    Calls the methods in its invocation list when a participant is added to the list of ConnectedParticipants

    Declaration
    public event Action<IParticipant> ParticipantAdded
    Event Type
    Type Description
    Action<IParticipant>

    ParticipantRemoved

    Calls the methods in its invocation list when a participant is removed to the list of ConnectedParticipants

    Declaration
    public event Action<IParticipant> ParticipantRemoved
    Event Type
    Type Description
    Action<IParticipant>

    Extension Methods

    GenericDataExtensions.SerializeToByteArray(Object)
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023