docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class CommonNetworkParametersExtensions

    Inheritance
    object
    CommonNetworkParametersExtensions
    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
    Assembly: Unity.Networking.Transport.dll
    Syntax
    public static class CommonNetworkParametersExtensions

    Methods

    GetDataStreamParameters(ref NetworkSettings)

    Gets the NetworkDataStreamParameter

    Declaration
    public static NetworkDataStreamParameter GetDataStreamParameters(this ref NetworkSettings settings)
    Parameters
    Type Name Description
    NetworkSettings settings

    NetworkSettings to get parameters from.

    Returns
    Type Description
    NetworkDataStreamParameter

    Returns the NetworkDataStreamParameter values for the NetworkSettings

    GetNetworkConfigParameters(ref NetworkSettings)

    Gets the NetworkConfigParameter in the settings.

    Declaration
    public static NetworkConfigParameter GetNetworkConfigParameters(this ref NetworkSettings settings)
    Parameters
    Type Name Description
    NetworkSettings settings

    Settings to get parameters from.

    Returns
    Type Description
    NetworkConfigParameter

    Structure containing the network parameters.

    WithDataStreamParameters(ref NetworkSettings, int)

    Sets the NetworkDataStreamParameter values for the NetworkSettings

    Declaration
    [Obsolete("In Unity Transport 2.0, the data stream size will always be dynamically-sized and this API will be removed.")]
    public static ref NetworkSettings WithDataStreamParameters(this ref NetworkSettings settings, int size = 0)
    Parameters
    Type Name Description
    NetworkSettings settings
    int size

    size

    Returns
    Type Description
    NetworkSettings

    WithNetworkConfigParameters(ref NetworkSettings, int, int, int, int, int, int)

    Declaration
    public static ref NetworkSettings WithNetworkConfigParameters(this ref NetworkSettings settings, int connectTimeoutMS, int maxConnectAttempts, int disconnectTimeoutMS, int heartbeatTimeoutMS, int maxFrameTimeMS, int fixedFrameTimeMS)
    Parameters
    Type Name Description
    NetworkSettings settings
    int connectTimeoutMS
    int maxConnectAttempts
    int disconnectTimeoutMS
    int heartbeatTimeoutMS
    int maxFrameTimeMS
    int fixedFrameTimeMS
    Returns
    Type Description
    NetworkSettings

    WithNetworkConfigParameters(ref NetworkSettings, int, int, int, int, int, int, int)

    Declaration
    public static ref NetworkSettings WithNetworkConfigParameters(this ref NetworkSettings settings, int connectTimeoutMS = 1000, int maxConnectAttempts = 60, int disconnectTimeoutMS = 30000, int heartbeatTimeoutMS = 500, int maxFrameTimeMS = 0, int fixedFrameTimeMS = 0, int maxMessageSize = 1400)
    Parameters
    Type Name Description
    NetworkSettings settings
    int connectTimeoutMS
    int maxConnectAttempts
    int disconnectTimeoutMS
    int heartbeatTimeoutMS
    int maxFrameTimeMS
    int fixedFrameTimeMS
    int maxMessageSize
    Returns
    Type Description
    NetworkSettings
    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)