Struct NetworkSettings
A list of the parameters that describe the network configuration.
Inherited Members
Namespace: Unity.Networking.Transport
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.  | 
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 : struct, 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()
Implements
TryGet<T>(out T)
Try to get the parameter values for the specified type.
Declaration
public bool TryGet<T>(out T parameter)
    where T : struct, INetworkParameter
Parameters
| Type | Name | Description | 
|---|---|---|
| T | parameter | The stored parameter values.  | 
Returns
| Type | Description | 
|---|---|
| Boolean | Returns true if the parameter is in the paramaters list.  | 
Type Parameters
| Name | Description | 
|---|---|
| T | The type of the parameters to get.  |