Class UITKMail
UI Toolkit implementation of the mailbox panel.
Binds to UIMail.uxml / UIMail.uss.
public class UITKMail : UITKCharacterControl
- Inheritance
-
ObjectComponentBehaviourMonoBehaviourUITKMail
- 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
Remarks
A view of server state, like every other item-bearing panel here. Nothing is removed locally: claiming or deleting sends a request, the control is locked until the reply arrives, and the inbox is re-fetched from the server rather than edited in place. Mail carries items and currency, so a client that optimistically updated itself would be showing the player property they might not actually have.
Compose names an inventory slot, never an item. The dropdown is built from the player's own inventory purely so they can pick one by name; what crosses the wire is the slot index the server then resolves itself.
Methods
Hide(bool)
Hides the panel unless overrideIsAlwaysOpen is true.
public override void Hide(bool overrideIsAlwaysOpen)
Parameters
overrideIsAlwaysOpenboolWhen true, the call is a no-op.
OnAfterShow()
Fills the panel on every show.
protected override void OnAfterShow()
Remarks
Enabling the document re-clones the UXML, so both the element references and the button
callbacks have to be re-established — anything wired before Show() is attached to
a tree that no longer exists.
OnAfterStarting()
Re-applies the character once the visual tree exists.
protected override void OnAfterStarting()
Remarks
World entry calls FishMMO.Client.UIManager.SetCharacter(FishMMO.Shared.Core.IPlayerCharacter) for every control at once, and
a control that starts hidden has no visual tree until something shows it — so
OnPostSetCharacter() can run before OnStarting has cached any
elements. Overrides that write into those elements would then dereference null, and
even a null-safe one would leave the panel showing nothing, because the only call
that had data already happened. Running it again here is what makes the two orders
equivalent.
OnClientSet()
Called when a Client is injected via SetClient(Client). Override to subscribe to client events.
public override void OnClientSet()
OnClientUnset()
Called when the Client is cleared via SetClient(Client). Override to unsubscribe from client events.
public override void OnClientUnset()
OnStarting()
Called once the control's visual tree is available. Override to perform one-time initialisation against Root.
public override void OnStarting()
Remarks
Guaranteed to see a populated Root. For a control that starts hidden this runs when it is first shown rather than at Awake, because a hidden panel's UIDocument is disabled and has no tree to query.