Table of Contents

Class UITKWorldLabel

Namespace
FishMMO.Client
Assembly
FishMMO.Client.dll

A poolable world-anchored label, drawn by UITKWorldLabelLayer. Supports automatic caching after a timed duration or manual caching via Cache(UITKWorldLabel). Visual effects are driven by a LabelEffect bit-flag field and processed each frame; multiple effects combine (e.g. FadeOut + FloatUp + ScaleDown).

[DisallowMultipleComponent]
[RequireComponent(typeof(WorldLabel))]
public sealed class UITKWorldLabel : MonoBehaviour, IReference
Inheritance
Object
Component
Behaviour
MonoBehaviour
UITKWorldLabel
Implements
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.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

This is the UI Toolkit successor to the TextMeshPro-backed Cached3DLabel. The effect timeline is carried over unchanged — same flags, same tuning fields, same curves — because it was never rendering-specific: every effect is arithmetic on a position, a font size or a colour, and those are exactly the three things WorldLabel carries.

The one thing that had to change is where movement lands. The old label moved its own transform, which is not possible here for a label parented to a character that is itself moving. Offsets are written to WorldOffset instead, so effects compose with the anchor rather than replacing it — a damage number can float up off a target that is running away, which the transform-writing version could not do.

Fields

BounceAmplitude

Amplitude in world-units for Bounce.

public float BounceAmplitude

Field Value

float

BounceFrequency

Frequency in cycles per second for Bounce.

public float BounceFrequency

Field Value

float

FloatRandomGravity

Gravity (negative = downward) applied each second to FloatRandom.

public float FloatRandomGravity

Field Value

float

FloatRandomSpeed

Initial speed multiplier for FloatRandom.

public float FloatRandomSpeed

Field Value

float

FloatUpSpeed

Speed in world-units per second for FloatUp.

[Header("Effect Parameters")]
public float FloatUpSpeed

Field Value

float

PulseFrequency

Frequency in cycles per second for Pulse.

public float PulseFrequency

Field Value

float

PulseMax

Max scale multiplier for Pulse.

public float PulseMax

Field Value

float

PulseMin

Min scale multiplier for Pulse.

public float PulseMin

Field Value

float

ShakeIntensity

Maximum offset in world-units per axis for Shake.

public float ShakeIntensity

Field Value

float

WaveAmplitude

Amplitude in world-units for Wave.

public float WaveAmplitude

Field Value

float

WaveFrequency

Frequency in cycles per second for Wave.

public float WaveFrequency

Field Value

float

Properties

IsManuallyCached

True when the owner is responsible for returning this label to the pool.

public bool IsManuallyCached { get; }

Property Value

bool

Remarks

Read by UITKLabelMaker so that the live cap never recycles a label a caller is still holding — a nameplate or target frame would otherwise find its label silently reused as somebody else's damage number.

IsPooled

True while this label is sitting in the pool rather than displayed.

public bool IsPooled { get; }

Property Value

bool

Remarks

The flag exists so caching is idempotent. Without it a label cached twice — the expiry path returning it, and a caller that still holds the reference returning it again — was enqueued twice and subsequently handed to two callers at once.

Label

The underlying label data, for callers that need to read or set text directly.

public WorldLabel Label { get; }

Property Value

WorldLabel

Methods

Initialize(string, Vector3, Color, float, float, bool, int)

Initializes the label with the specified display properties, effects, and activates it.

public void Initialize(string text, Vector3 position, Color color, float fontSize, float persistTime, bool manualCache, int effectFlags = 0)

Parameters

text string

Text to display.

position Vector3

World position for the label.

color Color

Text color.

fontSize float

Font size in world units, scaled by distance at render time.

persistTime float

Duration in seconds before automatic caching. Ignored if manualCache is true.

manualCache bool

If true, the label must be cached manually via Cache(UITKWorldLabel).

effectFlags int

Bit-flag field of LabelEffect values to apply. 0 for no effects.

SetColor(Color)

Sets the text color and updates the base color anchor for fade effects.

public void SetColor(Color color)

Parameters

color Color

The new color.

SetFontSize(float)

Sets the font size and updates the base font size anchor for scale effects.

public void SetFontSize(float fontSize)

Parameters

fontSize float

The new font size in world units.

SetPosition(Vector3)

Sets the world position of the label and clears any accumulated effect offset.

public void SetPosition(Vector3 position)

Parameters

position Vector3

The new world position.

SetText(string)

Sets the displayed text content.

public void SetText(string text)

Parameters

text string

The new text to display.