docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct NetworkSettings

    A list of the parameters that describe the network configuration.

    Implements
    IDisposable
    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Unity.Networking.Transport
    Assembly: Unity.Networking.Transport.dll
    Syntax
    public struct NetworkSettings : IDisposable

    Constructors

    NetworkSettings(Allocator)

    Creates a new NetworkSettings object using the provided allocator. If no Allocator is provided, Allocator.Temp will be used.

    Declaration
    public NetworkSettings(Allocator allocator)
    Parameters
    Type Name Description
    Allocator allocator

    The allocator used for the parameters list. When Allocator.Temp is used, the settings are valid to use only during one frame.

    Properties

    IsCreated

    If the settings have been created (e.g. not disposed).

    Declaration
    public bool IsCreated { get; }
    Property Value
    Type Description
    bool

    Methods

    AddRawParameterStruct<T>(ref T)

    Adds a new parameter to the list. There must be only one instance per parameter type.

    Declaration
    public void AddRawParameterStruct<T>(ref T parameter) where T : unmanaged, INetworkParameter
    Parameters
    Type Name Description
    T parameter

    The parameter to add.

    Type Parameters
    Name Description
    T

    The type of INetworkParameter to add.

    Exceptions
    Type Condition
    ArgumentException

    Throws an argument exception if the paramter type is already in the list or if it contains invalid values.

    Dispose()

    Declaration
    public void Dispose()

    TryGet<T>(out T)

    Try to get the parameter values for the specified type.

    Declaration
    public bool TryGet<T>(out T parameter) where T : unmanaged, INetworkParameter
    Parameters
    Type Name Description
    T parameter

    The stored parameter values.

    Returns
    Type Description
    bool

    Returns true if the parameter is in the paramaters list.

    Type Parameters
    Name Description
    T

    The type of the parameters to get.

    Implements

    IDisposable

    Extension Methods

    BaselibNetworkParameterExtensions.GetBaselibNetworkInterfaceParameters(ref NetworkSettings)
    BaselibNetworkParameterExtensions.WithBaselibNetworkInterfaceParameters(ref NetworkSettings, int, int, uint)
    CommonNetworkParametersExtensions.GetDataStreamParameters(ref NetworkSettings)
    CommonNetworkParametersExtensions.GetNetworkConfigParameters(ref NetworkSettings)
    CommonNetworkParametersExtensions.WithDataStreamParameters(ref NetworkSettings, int)
    CommonNetworkParametersExtensions.WithNetworkConfigParameters(ref NetworkSettings, int, int, int, int, int, int)
    CommonNetworkParametersExtensions.WithNetworkConfigParameters(ref NetworkSettings, int, int, int, int, int, int, int)
    NetworkPipelineParametersExtensions.GetPipelineParameters(ref NetworkSettings)
    NetworkPipelineParametersExtensions.WithPipelineParameters(ref NetworkSettings, int)
    RelayParameterExtensions.GetRelayParameters(ref NetworkSettings)
    RelayParameterExtensions.WithRelayParameters(ref NetworkSettings, ref RelayServerData, int)
    SecureParameterExtensions.GetSecureParameters(ref NetworkSettings)
    SecureParameterExtensions.WithSecureClientParameters(ref NetworkSettings, string)
    SecureParameterExtensions.WithSecureClientParameters(ref NetworkSettings, string, string)
    SecureParameterExtensions.WithSecureClientParameters(ref NetworkSettings, string, string, string, string)
    SecureParameterExtensions.WithSecureClientParameters(ref NetworkSettings, ref FixedString32Bytes, uint, uint, uint)
    SecureParameterExtensions.WithSecureClientParameters(ref NetworkSettings, ref FixedString4096Bytes, ref FixedString32Bytes, uint, uint, uint)
    SecureParameterExtensions.WithSecureClientParameters(ref NetworkSettings, ref FixedString4096Bytes, ref FixedString4096Bytes, ref FixedString4096Bytes, ref FixedString32Bytes, uint, uint, uint)
    SecureParameterExtensions.WithSecureParameters(ref NetworkSettings, ref FixedString4096Bytes, ref FixedString32Bytes, SecureTransportProtocol, SecureClientAuthPolicy, uint, uint, uint)
    SecureParameterExtensions.WithSecureParameters(ref NetworkSettings, ref FixedString4096Bytes, ref FixedString4096Bytes, ref FixedString4096Bytes, ref FixedString32Bytes, SecureTransportProtocol, SecureClientAuthPolicy, uint, uint, uint)
    SecureParameterExtensions.WithSecureServerParameters(ref NetworkSettings, string, string)
    SecureParameterExtensions.WithSecureServerParameters(ref NetworkSettings, string, string, string, string, SecureClientAuthPolicy)
    SecureParameterExtensions.WithSecureServerParameters(ref NetworkSettings, ref FixedString4096Bytes, ref FixedString4096Bytes, uint, uint, uint)
    SecureParameterExtensions.WithSecureServerParameters(ref NetworkSettings, ref FixedString4096Bytes, ref FixedString4096Bytes, ref FixedString4096Bytes, ref FixedString32Bytes, SecureClientAuthPolicy, uint, uint, uint)
    FragmentationStageParameterExtensions.GetFragmentationStageParameters(ref NetworkSettings)
    FragmentationStageParameterExtensions.WithFragmentationStageParameters(ref NetworkSettings, int)
    ReliableStageParameterExtensions.GetReliableStageParameters(ref NetworkSettings)
    ReliableStageParameterExtensions.WithReliableStageParameters(ref NetworkSettings, int)
    SimulatorStageParameterExtensions.GetSimulatorStageParameters(ref NetworkSettings)
    SimulatorStageParameterExtensions.WithSimulatorStageParameters(ref NetworkSettings, int, int, int, int, int, int, int, int, uint)
    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)