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).
Implements
Inherited Members
MonoBehaviour.IsInvoking()
MonoBehaviour.CancelInvoke()
MonoBehaviour.StopCoroutine(Coroutine)
MonoBehaviour.StopAllCoroutines()
MonoBehaviour.destroyCancellationToken
MonoBehaviour.useGUILayout
MonoBehaviour.runInEditMode
Behaviour.enabled
Behaviour.isActiveAndEnabled
Component.GetComponentIndex()
Component.transform
Component.gameObject
Component.tag
Object.GetInstanceID()
Object.InstantiateAsync<T>(T)
Object.InstantiateAsync<T>(T, Transform)
Object.InstantiateAsync<T>(T, Vector3, Quaternion)
Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)
Object.InstantiateAsync<T>(T, InstantiateParameters)
Object.InstantiateAsync<T>(T, Vector3, Quaternion, InstantiateParameters)
Object.Instantiate(Object, Vector3, Quaternion)
Object.Instantiate(Object, Vector3, Quaternion, Transform)
Object.Instantiate(Object)
Object.Instantiate(Object, Scene)
Object.Instantiate<T>(T, InstantiateParameters)
Object.Instantiate<T>(T, Vector3, Quaternion, InstantiateParameters)
Object.Instantiate(Object, Transform)
Object.Destroy(Object)
Object.DestroyImmediate(Object)
Object.DontDestroyOnLoad(Object)
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
Object.name
Object.hideFlags
Namespace: Unity.NetCode
Assembly: Unity.NetCode.dll
Syntax
public sealed class OverrideAutomaticNetcodeBootstrap : MonoBehaviour, IComparable<OverrideAutomaticNetcodeBootstrap>
Remarks
Our Unity.Entities.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
ForceAutomaticBootstrapInScene
ClientServerBootstrap to either be EnableAutomaticBootstrap or DisableAutomaticBootstrap.
Declaration
[Tooltip("Note: This will only replace the bootstrap for this one scene, and only if this scene is the Active scene when entering playmode, or the first scene in the build.")]
public NetCodeConfig.AutomaticBootstrapSetting ForceAutomaticBootstrapInScene
Field Value
Type | Description |
---|---|
NetCodeConfig.AutomaticBootstrapSetting |