docs.unity3d.com
    Show / Hide Table of Contents

    Class NetcodeService

    Provides methods for connecting and disconnecting to the runtime Unity Cloud multiparticipant server

    Inheritance
    Object
    NetcodeService
    Inherited Members
    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 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
    INetcodeService.GenericMessageHandler

    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
    IParticipantProvider<TParticipant>.GetServiceParticipant(Participant)

    Join()

    Joins the runtime multiparticipant room

    Declaration
    public void Join()
    Implements
    INetcodeService.Join()

    Leave()

    Leaves the runtime multiparticipant room

    Declaration
    public void Leave()
    Implements
    INetcodeService.Leave()

    Participants()

    Declaration
    public IEnumerable<INetcodeParticipant> Participants()
    Returns
    Type Description
    IEnumerable<INetcodeParticipant>
    Implements
    INetcodeService.Participants()

    Events

    ClientStarted

    Declaration
    public event Action ClientStarted
    Event Type
    Type Description
    Action
    Implements
    INetcodeService.ClientStarted

    ClientStopped

    Declaration
    public event Action ClientStopped
    Event Type
    Type Description
    Action
    Implements
    INetcodeService.ClientStopped

    ParticipantAdded

    Declaration
    public event Action<INetcodeParticipant> ParticipantAdded
    Event Type
    Type Description
    Action<INetcodeParticipant>
    Implements
    INetcodeService.ParticipantAdded

    ParticipantRemoved

    Declaration
    public event Action<INetcodeParticipant> ParticipantRemoved
    Event Type
    Type Description
    Action<INetcodeParticipant>
    Implements
    INetcodeService.ParticipantRemoved

    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