Class UITKAchievements
UI Toolkit achievements panel. Renders achievement category buttons and, for the selected category, each achievement's icon, description, progress bar, and value.
public class UITKAchievements : UITKCharacterControl
- Inheritance
-
ObjectComponentBehaviourMonoBehaviourUITKAchievements
- 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
Methods
AchievementController_OnUpdateAchievement(ICharacter, Achievement)
Creates or updates the row (and category button) for an achievement.
public void AchievementController_OnUpdateAchievement(ICharacter character, Achievement achievement)
Parameters
characterICharacterThe character associated with the achievement.
achievementAchievementThe achievement to update.
Category_OnClick(AchievementCategory)
Selects a category and shows only its achievement rows.
public void Category_OnClick(AchievementCategory type)
Parameters
typeAchievementCategoryThe category to display.
ClearAll()
Removes all category buttons and achievement rows.
public void ClearAll()
OnDestroying()
Unsubscribes from events and clears UI when the control is destroyed.
public override void OnDestroying()
OnPostSetCharacter()
Subscribes to achievement updates and rebuilds every row from the character's data.
public override void OnPostSetCharacter()
OnPreSetCharacter()
Drops the achievement subscription and the rows built against the previous tree.
public override void OnPreSetCharacter()
Remarks
The Pre half is what makes re-initialisation idempotent. OnAfterStarting runs
OnPreSetCharacter then OnPostSetCharacter on every tree rebuild, and this
panel's unsubscribe used to live in OnPreUnsetCharacter() instead — a
method that path never calls. The result was one extra static subscription per reopen,
on a static event, so the handler ran N times for a panel opened N times.
The rows are cleared here as well. They are VisualElements belonging to the tree
that has just been replaced; keeping them would leave the dictionary full of elements
nothing paints, and the panel would come back correctly wired and completely empty.
OnPreUnsetCharacter()
Unsubscribes from achievement update events before the character is unset.
public override void OnPreUnsetCharacter()
OnQuitToLogin()
Clears all achievement UI when quitting to login.
public override void OnQuitToLogin()
OnStarting()
Queries containers and subscribes to character/client lifecycle events.
public override void OnStarting()