PatronNameUI
Overview
Handles name entry for the Patron: updates an Atom string, shows a live character count (N/15), enables the Start button when non-empty, and plays a typing SFX while editing. Animates the name panel in/out with DOTween.
Serialized
- StringVariable
patronName - DOTweenAnimation
panelTween - SFXSingle
typingSFX - UI:
TextMeshProUGUI patronNameText,TextMeshProUGUI characterCount,Button startButton
Behavior
- Start() →
OnValueChanged(patronNameText.text)to initialize the count and button state. - OnValueChanged(string name)
characterCount.text = name.Length + "/15"patronName.Value = namestartButton.interactable = name.Length > 0typingSFX.Play()
- OnEditStart() / OnEditEnd()
- Plays the tween forward on focus and backward on end (
ForceMeshUpdate()is called first).
- Plays the tween forward on focus and backward on end (
Note: the computed last-character right edge is not used; safe to remove unless needed for custom layout.