Table of Contents

Class UITKAbilities

Namespace
FishMMO.Client
Assembly
FishMMO.Client.dll

UI Toolkit abilities panel: what the character can cast, and what they can craft with.

public class UITKAbilities : UITKCharacterControl
Inheritance
Object
Component
Behaviour
MonoBehaviour
UITKAbilities
Inherited Members
MonoBehaviour.IsInvoking()
MonoBehaviour.CancelInvoke()
MonoBehaviour.StopCoroutine(Coroutine)
MonoBehaviour.StopAllCoroutines()
MonoBehaviour.destroyCancellationToken
MonoBehaviour.useGUILayout
MonoBehaviour.didStart
MonoBehaviour.didAwake
MonoBehaviour.runInEditMode
Behaviour.enabled
Behaviour.isActiveAndEnabled
Component.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.transform
Component.transformHandle
Component.gameObject
Component.tag
Object.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.name
Object.hideFlags

Remarks

Two tabs, because there are two kinds of thing. An ability on the Abilities tab is finished — it can be dragged onto a hotkey and used. Everything on the Knowledge tab is a part: a base ability is the core of a craft, an effect is something a base ability is configured with, and neither does anything until they are combined at an Ability Crafter. The panel used to show all three as identical icon squares, so a template read as an ability that simply refused to work (issue #247).

Rows, not bare icons. Each entry carries its name and the numbers that distinguish it, and selecting one renders its full description in the pane beside the list — the same TooltipContent the cursor tooltip draws, through the same UITKTooltipView. An icon grid could not show any of that, so two abilities that differed only in cooldown and range looked the same until the player hovered each in turn.

Only the Abilities tab drags. A click that cannot pick an entry up writes the reason to the status line under the list, where the tab's standing hint otherwise sits.

Methods

AddAbility(Ability)

Adds a row for a usable ability.

public void AddAbility(Ability ability)

Parameters

ability Ability

The ability to add.

AddKnownAbility(BaseAbilityTemplate)

Adds a row for a base ability the character knows.

public void AddKnownAbility(BaseAbilityTemplate template)

Parameters

template BaseAbilityTemplate

The base ability template to add.

AddKnownAbilityEvent(AbilityEvent)

Adds a row for an effect the character knows.

public void AddKnownAbilityEvent(AbilityEvent abilityEvent)

Parameters

abilityEvent AbilityEvent

The ability event to add.

OnAfterShow()

Resets the status line and the details pane for a fresh open.

protected override void OnAfterShow()

Remarks

Both persist with the tree: a refusal or forget-failure message would greet the next open, and a details pane closed while previewing a hovered row would go on showing that row.

OnClientSet()

Registers the forget result handler when the client is set.

public override void OnClientSet()

Remarks

Here rather than in OnStarting(), which is where this panel used to keep it. The handler belongs to the client and not to the visual tree, and SwitchTab sits after that point in OnStarting() — a network manager that was not up yet threw there and left the panel's tabs unselected, which is the failure the sibling craft panel avoids by registering here too.

Guarded, as UITKSceneChannel guards it. Client.NetworkManager is a static field resolved from the scene and may already be destroyed during teardown, so the null check is Unity's fake-null and not a formality: without it a throw out of OnClientUnset would abort UITKControl.SetClient before it cleared the client and unsubscribed its quit-to-login handler.

OnClientUnset()

Unregisters the forget result handler when the client is unset.

public override void OnClientUnset()

OnDestroying()

Unsubscribes from events and clears all rows when the control is destroyed.

public override void OnDestroying()

OnPostSetCharacter()

Subscribes to ability controller events after the character is set.

public override void OnPostSetCharacter()

OnPreSetCharacter()

Drops the outgoing character's subscriptions before a new character is applied.

public override void OnPreSetCharacter()

Remarks

UITKCharacterControl.OnAfterStarting calls Pre then Post on every tree rebuild so the two cancel out. With Pre un-overridden the cancelling half did nothing and each rebuild stacked another copy of all four handlers.

OnPreUnsetCharacter()

Clears rows when the character is unset.

public override void OnPreUnsetCharacter()

OnQuitToLogin()

Clears rows when quitting to login.

public override void OnQuitToLogin()

OnStarting()

Queries elements, wires the tabs, filters and search, and subscribes to lifecycle events.

public override void OnStarting()

RemoveAbility(long)

Removes the row for an ability the character no longer knows.

public void RemoveAbility(long referenceID)

Parameters

referenceID long

The removed ability's reference ID.

SwitchFilter(KnowledgeFilterType)

Narrows the knowledge tab to one kind of part.

public void SwitchFilter(KnowledgeFilterType filter)

Parameters

filter KnowledgeFilterType

The filter to apply.

SwitchTab(AbilityTabType)

Switches the visible tab.

public void SwitchTab(AbilityTabType tab)

Parameters

tab AbilityTabType

The tab to display.