Table of Contents

Class UITKServerSelect

Namespace
FishMMO.Client
Assembly
FishMMO.Client.dll

UI Toolkit implementation of the world server selection control. Displays the available world servers, allows selecting and connecting to one, and refreshing the list.

public class UITKServerSelect : UITKControl
Inheritance
Object
Component
Behaviour
MonoBehaviour
UITKServerSelect
Inherited Members
MonoBehaviour.IsInvoking()
MonoBehaviour.CancelInvoke()
MonoBehaviour.StopCoroutine(Coroutine)
MonoBehaviour.StopAllCoroutines()
MonoBehaviour.destroyCancellationToken
MonoBehaviour.useGUILayout
MonoBehaviour.didStart
MonoBehaviour.didAwake
MonoBehaviour.runInEditMode
Behaviour.enabled
Behaviour.isActiveAndEnabled
Component.GetComponent<T>()
Component.TryGetComponent<T>(out T)
Component.GetComponentInChildren<T>()
Component.GetComponentsInChildren<T>()
Component.GetComponentInParent<T>()
Component.GetComponentsInParent<T>()
Component.GetComponents<T>()
Component.GetComponentIndex()
Component.CompareTag(TagHandle)
Component.transform
Component.transformHandle
Component.gameObject
Component.tag
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

Fields

RefreshRate

How often the server list can be refreshed (seconds).

public float RefreshRate

Field Value

float

Properties

CanDrag

Full-screen forms are not windows: there is nowhere to drag them to.

protected override bool CanDrag { get; }

Property Value

bool

Remarks

See CanDrag, which defaults every Window panel to draggable.

Methods

DestroyServerList()

Forgets the world list and removes every row.

public void DestroyServerList()

OnAfterShow()

Re-renders the world list and the control states after the visual tree was rebuilt.

protected override void OnAfterShow()

Remarks

Every element this panel writes to is replaced on each hide/show. The connect lock matters as much as the rows do: it came back enabled while the hop-token request it was guarding was still outstanding, so a second click started a second handoff.

OnAfterStarting()

Re-renders the world list and the control states after the visual tree was rebuilt.

protected override void OnAfterStarting()

Remarks

Every element this panel writes to is replaced on each hide/show. The connect lock matters as much as the rows do: it came back enabled while the hop-token request it was guarding was still outstanding, so a second click started a second handoff.

OnClick_Back()

Returns to the character list without tearing the session down. Bound to both the Back button and Escape.

public void OnClick_Back()

Remarks

A handoff that is already in flight is the exception: OnClick_ConnectToServer() starts Client.RequestHopTokenThenConnect, a coroutine that waits up to five seconds for a token and then connects regardless. Nothing cancels it but the teardown in Client.QuitToLogin, so simply hiding this panel would drop the player into the world from the character list they had just backed out to. Escape is deliberately never blocked (see Attach(UITKControl, VisualElement, Action, Action, Func<bool>)), so backing out mid-handoff does what it always did — ends the session — and says so rather than appearing to log the player out at random.

OnClick_ConnectToServer()

Initiates connection to the selected world server.

public void OnClick_ConnectToServer()

OnClick_Quit()

Stops coroutines and quits the client.

public void OnClick_Quit()

OnClick_QuitToLogin()

Returns to the login screen.

public void OnClick_QuitToLogin()

OnClick_Refresh()

Requests an updated server list if allowed by the refresh timer.

public void OnClick_Refresh()

OnClientSet()

Registers for server list and authentication events when the client is injected.

public override void OnClientSet()

OnClientUnset()

Unregisters server list and authentication events when the client is cleared.

public override void OnClientUnset()

OnDestroying()

Cleans up the server list when the control is destroyed.

public override void OnDestroying()

OnQuitToLogin()

Unlocks the connect button and forgets the world list when quitting to login.

public override void OnQuitToLogin()

Remarks

The list belongs to the account that just logged out — it is sent in answer to that account's character selection. Leaving it behind meant the next account to sign in saw the previous one's worlds, with the previous one's row still highlighted, until its own list arrived; and saw them indefinitely if it never did. UITKCharacterSelect has cleared its list here for the same reason.

OnStarting()

Resolves and caches visual elements and wires up button callbacks.

public override void OnStarting()

OnTick()

Unity Update callback. Decrements the refresh cooldown timer each frame.

protected override void OnTick()