Class UITKSceneChannel
UI Toolkit scene-channel picker. Lists the other instances ("channels") of the open-world scene the character is standing in, and asks the server to move the character to the one the player chooses.
public class UITKSceneChannel : UITKCharacterControl
- Inheritance
-
ObjectComponentBehaviourMonoBehaviourUITKSceneChannel
- 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
Distinct from UITKChatChannelPicker, which selects a chat channel and has nothing to do with scene instances.
The list is a MODEL (FishMMO.Client.UITKSceneChannel.channels, plain data) rendered into a VIEW that is
rebuilt from scratch on every open. UIDocument re-clones the UXML each time it is
enabled, so anything written into elements before Show() belongs to
a tree that is discarded microseconds later — the same rule UITKParty
documents at length.
Every open asks the server. A channel list is a population snapshot that goes stale in seconds, and the server has no way to push an update: it answers RequestSceneChannelListBroadcast and nothing else. Rendering a cached list would show the player capacities that no longer exist and then refuse the switch they made on the strength of them.
The wait is bounded. The server debounces list requests per connection and drops one that arrives while another is in flight, without replying — so a request is not guaranteed an answer, and a picker that waited forever would present an empty window with no explanation. See FishMMO.Client.UITKSceneChannel.RequestTimeoutSeconds.
Properties
Layer
Draw order tier for this panel. See UITKPanelLayer.
protected override UITKPanelLayer Layer { get; }
Property Value
Remarks
UI Toolkit orders drawing and input by sorting order alone, so a panel opened
from the game menu has to clear it: at the default Window tier this would appear
underneath the menu that opened it and receive no pointer events at all.
Popup rather than Settings, even though Options is opened from the same place. Panels sharing a tier fall back to the order they happened to register in, which is scene load order — and Options lives in ClientPreboot while this lives in ClientWorldGUI, so with both open the winner would be decided by which scene loaded first. Popup is the tier the chat channel picker and the other choosers already use, and nothing is raised from inside this panel that would need to sit above it.
Methods
OnAfterShow()
Asks the server for a fresh list every time the panel opens.
protected override void OnAfterShow()
Remarks
See the class remarks for why the previous answer is never reused.
OnAfterStarting()
Re-renders after the visual tree has been rebuilt.
protected override void OnAfterStarting()
OnClientSet()
Subscribes to the channel list broadcast.
public override void OnClientSet()
OnClientUnset()
Unsubscribes from the channel list broadcast.
public override void OnClientUnset()
OnPostUnsetCharacter()
Drops the list when the character goes away.
public override void OnPostUnsetCharacter()
Remarks
The channels belong to one character's scene on one scene server. Carrying them across a character switch or a scene transfer would offer destinations that mean nothing on the new server — the server validates every selection against the character's own scene and refuses, so this was never exploitable, but it would show the player a list of places they cannot go.
OnStarting()
Queries the list container and wires the footer buttons.
public override void OnStarting()
Remarks
Runs against a fresh tree every time the document is enabled, so every cached element reference is replaced here and the previously generated rows are dropped — they belong to a tree that no longer exists.
OnTick()
Ends an outstanding wait that the server never answered.
protected override void OnTick()