Class PresenceManager
Provides a way to get Room instances based off an Id and implement ISessionProvider to use on other services.
Inherited Members
Namespace: Unity.Cloud.Presence.Runtime
Syntax
public class PresenceManager : IRoomProvider<Room>, ISessionProvider
Constructors
PresenceManager(IServiceMessagingClient, IServiceMessagingClient, IServiceHostResolver, ServiceProtocol)
Initializes and returns an instance of PresenceManager
Declaration
public PresenceManager(IServiceMessagingClient monitorClient, IServiceMessagingClient joinClient, IServiceHostResolver serviceHostResolver, ServiceProtocol serviceProtocol = ServiceProtocol.WebSocketSecure)
Parameters
| Type | Name | Description |
|---|---|---|
| IServiceMessagingClient | monitorClient | The IServiceMessagingClient to be used for RoomMonitoring |
| IServiceMessagingClient | joinClient | The IServiceMessagingClient to be used for RoomJoiner |
| IServiceHostResolver | serviceHostResolver | The IServiceHostResolver to be used for resolving the service address. |
| ServiceProtocol | serviceProtocol | The ServiceProtocol for resolving the service address. |
Properties
Session
Indicates in the current session if the local participant has joined.
Declaration
public ISession Session { get; }
Property Value
| Type | Description |
|---|---|
| ISession |
Implements
Methods
GetRoomAsync(SceneId)
Returns a room instance given a SceneId.
Declaration
public Task<Room> GetRoomAsync(SceneId id)
Parameters
| Type | Name | Description |
|---|---|---|
| SceneId | id | The |
Returns
| Type | Description |
|---|---|
| Task<Room> | A room instance |
Implements
GetRoomAsync(RoomId)
Returns a room instance given a RoomId.
Declaration
public Task<Room> GetRoomAsync(RoomId id)
Parameters
| Type | Name | Description |
|---|---|---|
| RoomId | id | The |
Returns
| Type | Description |
|---|---|
| Task<Room> | A room instance |
Implements
Events
SessionChanged
Calls the methods in its invocation list when the session changes. Returns Null if the participant left the session.
Declaration
public event Action<ISession> SessionChanged
Event Type
| Type | Description |
|---|---|
| Action<ISession> |