Table of Contents

Class WorldSceneSystem

Namespace
FishMMO.Server.Implementation.World.WorldServer
Assembly
FishMMO.Server.dll

Manages world scene connections, queues, and scene assignment for players in the MMO server. Handles open world and instanced scene logic, connection authentication, and database updates. Game logic and Broadcasts run synchronously on the main thread. Database operations are async to avoid blocking the main thread. Results from async DB queries that require main-thread state changes are marshalled via IWorldSceneSystemMainThreadQueueData.

[CreateAssetMenu(fileName = "WorldSceneSystem", menuName = "FishMMO/Server/WorldServer/World Scene System", order = 1)]
[RequiresDataContainer(typeof(WorldSceneSystemRuntimeData))]
[RequiresDataContainer(typeof(WorldSceneMappingData))]
[RequiresDataContainer(typeof(WorldSceneSystemMainThreadQueueData))]
[RequiresDataContainer(typeof(AsyncWorkerData))]
public class WorldSceneSystem : ServerBehaviour, IServerBehaviour<INetworkManagerWrapper, ServerManager, NetworkConnection, IServerBehaviour>, IServerComponent<INetworkManagerWrapper, ServerManager, NetworkConnection, IServerBehaviour>, IWorldSceneSystem, IServerBehaviour, IServerComponent
Inheritance
Object
ScriptableObject
WorldSceneSystem
Implements
IServerBehaviour<INetworkManagerWrapper, ServerManager, NetworkConnection, IServerBehaviour>
IServerComponent<INetworkManagerWrapper, ServerManager, NetworkConnection, IServerBehaviour>
Inherited Members
ScriptableObject.SetDirty()
ScriptableObject.CreateInstance<T>()
Object.GetEntityId()
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.name
Object.hideFlags

Methods

GetMaxClients(string)

Gets the maximum number of clients allowed for a given scene, using cached details if available.

public int GetMaxClients(string sceneName)

Parameters

sceneName string

Name of the scene.

Returns

int

Maximum number of clients for the scene.

InitializeOnce()

Called once to initialize the world scene system. Subscribes to authentication and connection events.

public override ServerComponentInitializationStatus InitializeOnce()

Returns

ServerComponentInitializationStatus

OnDeinitialize()

Called when the system is being destroyed. Unsubscribes from events and deletes world scene data from the database.

public override void OnDeinitialize()

OnRemoteConnectionStopped(NetworkConnection)

Handles remote connection disconnects. Removes connections from queues when they disconnect.

protected override void OnRemoteConnectionStopped(NetworkConnection conn)

Parameters

conn NetworkConnection

The network connection.

OnUpdate(float)

Called by the server's LateUpdate. Periodically processes open world and instance queues, and updates connection count.

protected override void OnUpdate(float deltaTime)

Parameters

deltaTime float

Time elapsed since last frame.