docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct RelayNetworkParameter

    Parameters for the Unity Relay connection.

    Implements
    INetworkParameter
    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Unity.Networking.Transport.Relay
    Assembly: Unity.Networking.Transport.dll
    Syntax
    [Serializable]
    public struct RelayNetworkParameter : INetworkParameter

    Fields

    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.

    Declaration
    public int RelayConnectionTimeMS
    Field Value
    Type Description
    int

    Frequency in milliseconds.

    ServerData

    Connection information about the relay server.

    Declaration
    public RelayServerData ServerData
    Field Value
    Type Description
    RelayServerData

    Server data structure.

    Methods

    Validate()

    Checks if the values for all fields are valid. This method will be automatically called when adding parameters to the NetworkSettings.

    Declaration
    public bool Validate()
    Returns
    Type Description
    bool

    True if the parameter is valid, false otherwise.

    Implements

    INetworkParameter
    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)