Class ServerWindowTitleUpdater
- Namespace
- FishMMO.Server.Implementation
- Assembly
- FishMMO.Server.dll
Updates the server window or console title to reflect current server status, including transport type, connection state, and client count. Supports Windows, Linux, and OSX platforms.
[CreateAssetMenu(fileName = "ServerWindowTitleUpdater", menuName = "FishMMO/Server/Server Window Title Updater", order = 1)]
[RequiresDataContainer(typeof(ServerWindowTitleUpdaterRuntimeData))]
public class ServerWindowTitleUpdater : ServerBehaviour, IServerBehaviour<INetworkManagerWrapper, ServerManager, NetworkConnection, IServerBehaviour>, IServerBehaviour, IServerComponent<INetworkManagerWrapper, ServerManager, NetworkConnection, IServerBehaviour>, IServerComponent
- Inheritance
-
ObjectScriptableObjectServerWindowTitleUpdater
- Implements
- 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.nameObject.hideFlags
Methods
BuildWindowTitle()
Builds the window title string based on server configuration, transport type, connection state, port, and client count.
public string BuildWindowTitle()
Returns
- string
The formatted window title string.
InitializeOnce()
Called once to initialize the server window title updater. Validates that the required RuntimeDataContainer is available.
public override ServerComponentInitializationStatus InitializeOnce()
Returns
OnDeinitialize()
Called when the object is being destroyed. No custom logic implemented.
public override void OnDeinitialize()
OnUpdate(float)
Called by the server's LateUpdate. Updates the window title at the specified rate while the server is running.
protected override void OnUpdate(float deltaTime)
Parameters
deltaTimefloatTime elapsed since last frame.
UpdateWindowTitle()
Updates the window or console title to reflect current server status. Uses platform-specific APIs to set the title.
public void UpdateWindowTitle()