Class OverrideAutomaticNetcodeBootstrap
Add this to your Scene (on a root GameObject only!) to replace the automatic bootstrapping setting specified in your NetCodeConfig ProjectSettings asset. Note: Netcode will only search the Active scene for this MonoBehaviour, and only during bootstrap (which occurs only on game boot, before the first MonoBehaviour Awake).
Inherited Members
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
Namespace: Unity.NetCode
Assembly: solution.dll
Syntax
public sealed class OverrideAutomaticNetcodeBootstrap : MonoBehaviour
Remarks
Our ICustomBootstrap (ClientServerBootstrap) will use the first one it finds in any scenes. 2 (or more) will err. Also note: This will not work if you use your own bootstrapper, unless you call DetermineIfBootstrappingEnabled(bool) early, and return false if false.
Fields
| Name | Description |
|---|---|
| ForceAutomaticBootstrapInScene | ClientServerBootstrap to either be EnableAutomaticBootstrap or DisableAutomaticBootstrap. |