TextStudioAutoScrollFollower
public sealed class TextStudioAutoScrollFollower : MonoBehaviourKeeps a ScrollRect positioned near the most recently revealed TextMeshPro glyph.
Methods
Section titled “Methods”
SetTargets(TextStudioText, TMP_Text, ScrollRect)
Section titled “SetTargets(TextStudioText, TMP_Text, ScrollRect)”public void SetTargets(TextStudioText textStudio, TMP_Text tmpText, ScrollRect scrollRect)Assigns playback, rendered text, and scroll targets for subsequent follow updates.
Parameters
| Name | Type |
|---|---|
textStudio |
TextStudio.TextStudioText |
tmpText |
TMPro.TMP_Text |
scrollRect |
UnityEngine.UI.ScrollRect |
FollowNow()
Section titled “FollowNow()”public bool FollowNow()Scrolls immediately to keep the latest revealed glyph inside the padded viewport.
Returns
System.Boolean: false when targets, layout, or a scrollable range are unavailable.
RefreshMesh()
Section titled “RefreshMesh()”public void RefreshMesh()Forces TextMeshPro layout before the next reveal-position lookup.
Constructors
Section titled “Constructors”
TextStudioAutoScrollFollower()
Section titled “TextStudioAutoScrollFollower()”public TextStudioAutoScrollFollower()Properties
Section titled “Properties”
Target
Section titled “Target”public TextStudioText Target { get; set; }Returns
TextStudio.TextStudioText
TMPText
Section titled “TMPText”public TMP_Text TMPText { get; set; }Returns
TMPro.TMP_Text
ScrollRect
Section titled “ScrollRect”public ScrollRect ScrollRect { get; set; }Returns
UnityEngine.UI.ScrollRect
Padding
Section titled “Padding”public float Padding { get; set; }Returns
System.Single