Class UITKLoot
UI Toolkit implementation of the corpse loot panel.
Binds to UILoot.uxml / UILoot.uss and renders a dead NPC's contents as a
list of rows plus a currency line.
public class UITKLoot : UITKCharacterControl
- Inheritance
-
ObjectComponentBehaviourMonoBehaviourUITKLoot
- 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 pure view of server state. Nothing here removes an item: a click sends a request naming a slot index, the row is marked as waiting, and what changes the display is the server broadcasting the corpse's contents back. That indirection is not ceremony — the pile is shared between everyone who earned rights to it, so the item a player is looking at may already be gone, and a client that optimistically removed rows would routinely show a corpse that is emptier than it really is.
For the same reason the panel re-renders from whole snapshots rather than deltas. Every successful take by ANY looter causes the server to re-send the full contents to every viewer, so a client that missed an update still converges.
Methods
Hide(bool)
Hides the panel and tells the server this player is no longer looking at the corpse.
public override void Hide(bool overrideIsAlwaysOpen)
Parameters
overrideIsAlwaysOpenboolWhen true, the call is a no-op.
Remarks
Telling the server matters. It keeps a viewer list per corpse so one looter's take can refresh everyone else's window; a client that closed without saying so would keep receiving broadcasts for a panel nobody can see, for as long as the body lasts.
OnAfterShow()
Fills the panel on every show, including the very first one.
protected override void OnAfterShow()
Remarks
Enabling the document re-clones the UXML, so anything written before Show() is
discarded. This panel's first open is always driven by a server broadcast rather than
by startup, which is precisely the case where OnAfterStarting alone is not
enough — see the same note on the bank panel. Both hooks do the work and both are
idempotent.
OnAfterStarting()
Rebuilds the rows after the visual tree has been replaced.
protected override void OnAfterStarting()
OnClientSet()
Registers the corpse loot broadcast handlers.
public override void OnClientSet()
OnClientUnset()
Unregisters the corpse loot broadcast handlers.
public override void OnClientUnset()
OnDestroying()
Destroys runtime rows when the control is destroyed.
public override void OnDestroying()
OnStarting()
Queries named elements and wires up the header and footer buttons.
public override void OnStarting()
OnTick()
Releases rows whose reply never arrived.
protected override void OnTick()