docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class NetworkDriverRelayExtensions

    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.

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

    The new NetworkConnection (or default if failed).

    Remarks

    This method can only be used when using the Relay service.

    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
    Returns
    Type Description
    RelayConnectionStatus
    In This Article
    Back to top
    Copyright © 2025 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)