docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class NetworkDriverRelayExtensions

    Extenstions to NetworkDriver related to Unity Relay.

    Inheritance
    object
    NetworkDriverRelayExtensions
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.Networking.Transport.Relay
    Assembly: Unity.Networking.Transport.dll
    Syntax
    public static class NetworkDriverRelayExtensions

    Methods

    Connect(NetworkDriver)

    Connect to the relay server without specifying an endpoint.

    Declaration
    public static NetworkConnection Connect(this NetworkDriver driver)
    Parameters
    Type Name Description
    NetworkDriver driver

    Driver to use for the connection.

    Returns
    Type Description
    NetworkConnection

    The new connection (or default if connection failed).

    GetRelayConnectionStatus(NetworkDriver)

    Get the current status of the connection to the relay server.

    Declaration
    public static RelayConnectionStatus GetRelayConnectionStatus(this NetworkDriver driver)
    Parameters
    Type Name Description
    NetworkDriver driver

    Driver to query the status from.

    Returns
    Type Description
    RelayConnectionStatus

    Current relay connection status.

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)