Class UITKReconnectDisplay
UI Toolkit implementation of the reconnect display. Shows reconnect attempt progress and allows cancelling the reconnect attempt.
public class UITKReconnectDisplay : UITKControl
- Inheritance
-
ObjectComponentBehaviourMonoBehaviourUITKReconnectDisplay
- Inherited Members
-
MonoBehaviour.IsInvoking()MonoBehaviour.CancelInvoke()MonoBehaviour.StopCoroutine(Coroutine)MonoBehaviour.StopAllCoroutines()MonoBehaviour.destroyCancellationTokenMonoBehaviour.useGUILayoutMonoBehaviour.didStartMonoBehaviour.didAwakeMonoBehaviour.runInEditModeBehaviour.enabledBehaviour.isActiveAndEnabledComponent.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.transformComponent.transformHandleComponent.gameObjectComponent.tagObject.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
Properties
Layer
Draw order tier for this panel. See UITKPanelLayer.
protected override UITKPanelLayer Layer { get; }
Property Value
Remarks
Deliberately one tier above UITKLoadingScreen. The two are on screen
together for the whole of a reconnect and used to share System, where the
tie-break is registration order and the loser receives no pointer events — see
SystemAlert.
Methods
Hide(bool)
Hides the panel and hands the cursor back.
public override void Hide(bool overrideIsAlwaysOpen)
Parameters
overrideIsAlwaysOpenboolWhen true, the call is a no-op.
Remarks
Overrides Hide(bool), not Hide(). Hide() is non-virtual and only
forwards here, so this is the one place the cursor claim can be released where every
caller — the cancel button, the reconnect outcome handlers and the quit-to-login
teardown, which calls the bool form directly — reaches it. Leaving the claim set would
hold the cursor released for the rest of the session, because
HandleAutoDismiss asks whether any panel still wants it and this one would keep
saying yes.
OnAfterShow()
Called at the end of Show(), against the tree the player will actually see. Override to write content that changes from one opening to the next.
protected override void OnAfterShow()
Remarks
This exists because "set the text, then Show" does not work and fails silently. UnityEngine.UIElements.UIDocument clones the UXML on enable, so a panel that fills in its message, list rows or icon before calling Show() writes into a tree that is thrown away microseconds later, and the player sees whatever the UXML declares — an empty dialog, a blank tooltip, a selector with no rows.
Distinct from OnAfterStarting(), which re-applies state after the tree is rebuilt. This one runs on every show, rebuilt tree or not.
OnAfterStarting()
Called immediately after OnStarting(). Override to re-apply any state that arrived before the visual tree existed.
protected override void OnAfterStarting()
Remarks
Initialisation is no longer guaranteed to happen before the control is given data. A panel that starts hidden has no visual tree until it is shown, and world entry can hand it a character in the meantime — so whatever it was told before it had elements to write into has to be applied again here, or the panel stays blank.
OnCancelClicked()
Cancels the reconnect attempt and hides the UI.
public void OnCancelClicked()
Remarks
Cancelling a reconnect abandons the session, so it has to land somewhere the player can
act from. Hide() alone left the loading overlay behind it holding the screen with
its drivers still set and no panel underneath — see the H1 dead-end. Quitting to login
is the established teardown and every panel already implements it.
OnClientSet()
Subscribes to reconnect and connection events when the client is injected.
public override void OnClientSet()
OnClientUnset()
Unsubscribes from reconnect and connection events when the client is cleared.
public override void OnClientUnset()
OnCloseScreen()
Hides the reconnect screen.
public void OnCloseScreen()
OnReconnectAttemptsChanged(int, int)
Updates the UI and shows/hides controls when the reconnect attempt count changes.
public void OnReconnectAttemptsChanged(int attempts, int maxAttempts)
Parameters
OnStarting()
Resolves cached elements and wires up the cancel button.
public override void OnStarting()