Class AISystem
- Namespace
- FishMMO.Server.Implementation.World.SceneServer.AI
- Assembly
- FishMMO.Server.dll
The scene server's NPC brain system: runs one AIBrainHost for the process.
[CreateAssetMenu(fileName = "AISystem", menuName = "FishMMO/Server/Scene Server/AI System", order = 1)]
public class AISystem : ServerBehaviour, IServerBehaviour<INetworkManagerWrapper, ServerManager, NetworkConnection, IServerBehaviour>, IServerBehaviour, IServerComponent<INetworkManagerWrapper, ServerManager, NetworkConnection, IServerBehaviour>, IServerComponent
- Inheritance
-
ObjectScriptableObjectAISystem
- Implements
- Inherited Members
-
ScriptableObject.SetDirty()ScriptableObject.CreateInstance<T>()Object.GetEntityId()Object.MemberwiseClone()Object.GetInstanceID()Object.GetHashCode()Object.InstantiateAsync<T>(T)Object.InstantiateAsync<T>(T, Transform)Object.InstantiateAsync<T>(T, Vector3, Quaternion)Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)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.Instantiate<T>(T)Object.Instantiate<T>(T, Vector3, Quaternion)Object.Instantiate<T>(T, Vector3, Quaternion, Transform)Object.Instantiate<T>(T, Transform)Object.Destroy(Object)Object.DestroyImmediate(Object)Object.DontDestroyOnLoad(Object)Object.DestroyObject(Object)Object.FindObjectsOfType<T>()Object.FindObjectsByType<T>(FindObjectsSortMode)Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)Object.FindObjectOfType<T>()Object.FindFirstObjectByType<T>()Object.FindAnyObjectByType<T>()Object.FindFirstObjectByType<T>(FindObjectsInactive)Object.FindAnyObjectByType<T>(FindObjectsInactive)Object.FindObjectsByType<T>()Object.FindObjectsByType<T>(FindObjectsInactive)Object.ToString()Object.nameObject.hideFlags
Remarks
Every NPC the scene server spawns gets its AIController from here, with the archetype the Catalogue names for its prefab. Spawners and the pet system reach the host through TryGet(NetworkManager, out AIBrainHost).
Fields
Catalogue
Which brain each NPC prefab runs.
[Tooltip("Which brain each NPC prefab runs.")]
public AIBrainCatalogue Catalogue
Field Value
Properties
Host
The running host, or null before initialisation.
public AIBrainHost Host { get; }
Property Value
Methods
InitializeOnce()
Called once to initialize the behaviour. Must be implemented by derived classes.
public override ServerComponentInitializationStatus InitializeOnce()
Returns
Remarks
Behaviours that need to await I/O (database registration, for example) must override InitializeOnceAsync(CancellationToken) instead of blocking in here. The Unity main thread must never block on I/O: it is the thread that drains async continuations, so blocking it can deadlock startup before the transport ever binds.
OnDeinitialize()
Called when the behaviour is being deinitialized. Must be implemented by derived classes.
public override void OnDeinitialize()