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: solution.dll
Syntax
[CreateAssetMenu(menuName = "NetCode/NetCodeConfig Asset", fileName = "NetCodeConfig")]
public class NetCodeConfig : ScriptableObject, IComparable<NetCodeConfig>
Fields
| Name | Description |
|---|---|
| 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 NetworkStreamReceiveSystem
first update if not present.
On the server, by countrary, the entity is never automatically created and it is up to the user to create the singletong instance if
they need to.
It is not mandatory to set all the fields to a proper value when creating the singleton. It is sufficient to change only the relevant setting, and call the ResolveDefaults() method to
configure the fields that does not have a value set.
|
| 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. |
| 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. |
| GhostSendSystemData | Singleton entity that contains all the tweakable settings for the GhostSendSystem. |
| IsGlobalConfig | Netcode helper: Allows you to add multiple configs to the PreloadedAssets list. There can only be one global one. |
Properties
| Name | Description |
|---|---|
| Global | The Default NetcodeConfig asset, selected in ProjectSettings via the NetCode tab, and fetched at runtime via the PreloadedAssets. Set via RuntimeInitializeOnLoadMethodAttribute. |
Methods
| Name | Description |
|---|---|
| CompareTo(NetCodeConfig) | Makes Find deterministic. |
| Reset() | Setup default values. |