Class NetCodeConfig
Config file, allowing the package user to tweak netcode variables without having to write code. Create as many instances as you like.
Implements
Inherited Members
Namespace: Unity.NetCode
Assembly: Unity.NetCode.dll
Syntax
[CreateAssetMenu(menuName = "Multiplayer/NetCodeConfig Asset", fileName = "NetCodeConfig", order = 1)]
public class NetCodeConfig : ScriptableObject, IComparable<NetCodeConfig>
Fields
ClientServerTickRate
The ClientServerTickRate singleton is used to configure the client and server simulation time step,
server packet send rate and other related settings.
The singleton entity is automatically created for the clients in the Network
- Create the entity in a custom Client
Server after the worlds has been created.Bootstrap - On a system, in either the OnCreate or OnUpdate.
- the maximum number of tick per frame
- the maximum number of tick per frame
- tick batching (<`MaxSimulationStepBatchSize`) and others.
Declaration
public ClientServerTickRate ClientServerTickRate
Field Value
Type | Description |
---|---|
Client |
ClientTickRate
Create a ClientTickRate singleton in the client world (either at runtime or by loading it from sub-scene) to configure all the network time synchronization, interpolation delay, prediction batching and other setting for the client. See the individual fields for more information about the individual properties.
Declaration
public ClientTickRate ClientTickRate
Field Value
Type | Description |
---|---|
Client |
EnableClientServerBootstrap
Denotes if the ClientServerBootstrap (or any derived version of it) should be triggered on game boot. Project-wide setting, overridable via the OverrideAutomaticNetCodeBootstrap MonoBehaviour.
Declaration
[Header("NetCode")]
[Tooltip("Denotes if the ClientServerBootstrap (or any derived version of it) should be triggered on game boot. Project-wide setting (when this config is applied in the Netcode tab), overridable via the OverrideAutomaticNetCodeBootstrap MonoBehaviour.")]
[SerializeField]
public NetCodeConfig.AutomaticBootstrapSetting EnableClientServerBootstrap
Field Value
Type | Description |
---|---|
Net |
GhostSendSystemData
Singleton entity that contains all the tweakable settings for the Ghost
Declaration
public GhostSendSystemData GhostSendSystemData
Field Value
Type | Description |
---|---|
Ghost |
IsGlobalConfig
Netcode helper: Allows you to add multiple configs to the PreloadedAssets list. There can only be one global one.
Declaration
public bool IsGlobalConfig
Field Value
Type | Description |
---|---|
bool |
Properties
Global
The Default NetcodeConfig asset, selected in ProjectSettings via the NetCode tab,
and fetched at runtime via the PreloadedAssets. Set via Runtime
Declaration
public static NetCodeConfig Global { get; }
Property Value
Type | Description |
---|---|
Net |
Methods
CompareTo(NetCodeConfig)
Makes Find deterministic.
Declaration
public int CompareTo(NetCodeConfig other)
Parameters
Type | Name | Description |
---|---|---|
Net |
other |
Returns
Type | Description |
---|---|
int |
Reset()
Setup default values.
Declaration
public void Reset()