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.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
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
Panels keep their tree across hide and show, so an element written while hidden still holds that value when shown. This is the place for content that should be current at the moment of opening, and for resetting anything a fresh opening should not inherit from the last one: typed text, a pending confirmation, a leftover error.
Distinct from OnAfterStarting(), which runs once when the panel starts and again only if its tree is ever genuinely rebuilt. This one runs on every show.
OnAfterStarting()
Re-applies the state to a tree that was replaced while the panel was showing.
protected override void OnAfterStarting()
Remarks
Only while visible. The panel starts with its scene, hidden, and ApplyState claims
the cursor: run at scene load, it switched mouse mode on for a panel nobody could see.
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()