Skip to content

TextStudioAutoScrollFollower

ClassTextStudioTextStudio
public sealed class TextStudioAutoScrollFollower : MonoBehaviour

Keeps a ScrollRect positioned near the most recently revealed TextMeshPro glyph.

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
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.

public void RefreshMesh()

Forces TextMeshPro layout before the next reveal-position lookup.

public TextStudioAutoScrollFollower()

public TextStudioText Target { get; set; }

Returns

TextStudio.TextStudioText

public TMP_Text TMPText { get; set; }

Returns

TMPro.TMP_Text

public ScrollRect ScrollRect { get; set; }

Returns

UnityEngine.UI.ScrollRect

public float Padding { get; set; }

Returns

System.Single