Class NetcodeService
Provides methods for connecting and disconnecting to the runtime Unity Cloud multiparticipant server
Inherited Members
Namespace: Unity.Cloud.Presence.Runtime
Syntax
public class NetcodeService : INetcodeService, IParticipantProvider<INetcodeParticipant>
Constructors
NetcodeService(NetworkManager, NetcodeParticipantManager, ISessionProvider, IAccessTokenProvider, IAppIdProvider, ServiceHostConfiguration)
Initializes and returns an instance of PresentationService
Declaration
public NetcodeService(NetworkManager networkManager, NetcodeParticipantManager netcodeParticipantManager, ISessionProvider sessionProvider, IAccessTokenProvider accessTokenProvider, IAppIdProvider appIdProvider, ServiceHostConfiguration serviceHostConfiguration)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkManager | networkManager | The instance of the NGO NetworkManager |
| NetcodeParticipantManager | netcodeParticipantManager | The instance of the NetcodeParticipantManager |
| ISessionProvider | sessionProvider | The ISessionProvider. |
| IAccessTokenProvider | accessTokenProvider | The IAccessTokenProvider |
| IAppIdProvider | appIdProvider | The IAppIdProvider |
| ServiceHostConfiguration | serviceHostConfiguration |
Properties
GenericMessageHandler
Declaration
public IGenericMessageHandler GenericMessageHandler { get; }
Property Value
| Type | Description |
|---|---|
| IGenericMessageHandler |
Implements
Methods
Finalize()
Declaration
protected void Finalize()
GetServiceParticipant(Participant)
Declaration
public INetcodeParticipant GetServiceParticipant(Participant roomParticipant)
Parameters
| Type | Name | Description |
|---|---|---|
| Participant | roomParticipant |
Returns
| Type | Description |
|---|---|
| INetcodeParticipant |
Implements
Join()
Joins the runtime multiparticipant room
Declaration
public void Join()
Implements
Leave()
Leaves the runtime multiparticipant room
Declaration
public void Leave()
Implements
Participants()
Declaration
public IEnumerable<INetcodeParticipant> Participants()
Returns
| Type | Description |
|---|---|
| IEnumerable<INetcodeParticipant> |
Implements
Events
ClientStarted
Declaration
public event Action ClientStarted
Event Type
| Type | Description |
|---|---|
| Action |
Implements
ClientStopped
Declaration
public event Action ClientStopped
Event Type
| Type | Description |
|---|---|
| Action |
Implements
ParticipantAdded
Declaration
public event Action<INetcodeParticipant> ParticipantAdded
Event Type
| Type | Description |
|---|---|
| Action<INetcodeParticipant> |
Implements
ParticipantRemoved
Declaration
public event Action<INetcodeParticipant> ParticipantRemoved
Event Type
| Type | Description |
|---|---|
| Action<INetcodeParticipant> |