docs.unity3d.com
    Show / Hide Table of Contents

    Class RelayParameterExtensions

    Extensions for RelayNetworkParameter.

    Inheritance
    Object
    RelayParameterExtensions
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Unity.Networking.Transport.Relay
    Syntax
    public static class RelayParameterExtensions

    Methods

    GetRelayParameters(ref NetworkSettings)

    Gets the RelayNetworkParameter in the settings.

    Declaration
    public static RelayNetworkParameter GetRelayParameters(this ref NetworkSettings settings)
    Parameters
    Type Name Description
    NetworkSettings settings

    Settings to get parameters from.

    Returns
    Type Description
    RelayNetworkParameter

    Structure containing the relay parameters.

    WithRelayParameters(ref NetworkSettings, ref RelayServerData, Int32)

    Sets the RelayNetworkParameter in the settings.

    Declaration
    public static ref NetworkSettings WithRelayParameters(this ref NetworkSettings settings, ref RelayServerData serverData, int relayConnectionTimeMS = 3000)
    Parameters
    Type Name Description
    NetworkSettings settings

    Settings to modify.

    RelayServerData serverData

    Connection information about the relay server.

    Int32 relayConnectionTimeMS

    Frequency at which the relay server will be pinged to maintain the connection alive. Should be set to less than 10 seconds (default is 3 seconds) since that's the time after which the relay server will sever the connection if there is no activity.

    Returns
    Type Description
    NetworkSettings

    Settings structure with modified values.

    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