Show / Hide Table of Contents

    Unity PeerConnection component

    The PeerConnection Unity component encapsulates a single peer connection between the local application and another remote Unity peer application.

    Note

    The C# library also has a PeerConnection class, which this components build upon.

    The PeerConnection Unity component

    Property Description
    Behavior settings
    Auto Initialize On Start Automatically initialize the peer connection when the MonoBehaviour.Start(). If not set, the user need to call InitializeAsync() manually before using the component.
    Auto Log Errors To Unity Console Add an event listener to the OnError event which calls Debug.LogError() to display the error message in the Unity console.
    ICE servers
    Ice Servers A list of ConfigurableIceServer elements representing the list of ICE servers to use to establish the peer connection. The list can be empty, in which case only a local connection will be possible.
    Ice Username Optional user name for TURN servers authentication.
    Ice Credential Optional password for TURN servers authentication.
    Peer connection events
    On Initialized Event fired once the InitializeAsync() method returned successfully, to indicate that the peer connection component is ready for use.
    On Shutdown Event fired when Uninitialize() is called, usually automatically during MonoBehaviour.OnDestroy()
    On Error Event fired when an error occur in the peer connection.
    • Improve this Doc
    Back to top Generated by DocFX