TextStudioPageNavigator
[DisallowMultipleComponent][AddComponentMenu("Text Studio/Layout/Page Navigator")]public sealed class TextStudioPageNavigator : MonoBehaviourControls TextMeshPro page overflow manually or follows the page containing the latest revealed glyph.
Methods
Section titled “Methods”
SetTargets(TextStudioText, TMP_Text)
Section titled “SetTargets(TextStudioText, TMP_Text)”public void SetTargets(TextStudioText textStudio, TMP_Text tmpText)Assigns the playback host and paginated TextMeshPro output, then refreshes page state.
Parameters
| Name | Type |
|---|---|
textStudio |
TextStudio.TextStudioText |
tmpText |
TMPro.TMP_Text |
Refresh()
Section titled “Refresh()”public void Refresh()Forces current text layout and updates the valid 1-based page range.
NextPage()
Section titled “NextPage()”public void NextPage()Moves to the next page, clamped to the current page count.
PreviousPage()
Section titled “PreviousPage()”public void PreviousPage()Moves to the previous page, clamped to page one.
FirstPage()
Section titled “FirstPage()”public void FirstPage()Displays the first page.
LastPage()
Section titled “LastPage()”public void LastPage()Displays the last currently known page.
GoToPage(int)
Section titled “GoToPage(int)”public void GoToPage(int page)Displays a 1-based page number clamped to the current layout.
Parameters
| Name | Type |
|---|---|
page |
System.Int32 |
FollowRevealNow()
Section titled “FollowRevealNow()”public bool FollowRevealNow()Displays the page containing the most recently revealed semantic glyph.
Returns
System.Boolean: false when required targets or glyph mapping are unavailable.
Constructors
Section titled “Constructors”
TextStudioPageNavigator()
Section titled “TextStudioPageNavigator()”public TextStudioPageNavigator()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
FollowReveal
Section titled “FollowReveal”public bool FollowReveal { get; set; }Returns
System.Boolean
CurrentPage
Section titled “CurrentPage”public int CurrentPage { get; }Returns
System.Int32
PageCount
Section titled “PageCount”public int PageCount { get; }Returns
System.Int32
OnPageChanged
Section titled “OnPageChanged”public UnityEvent<int, int> OnPageChanged { get; }Returns
UnityEngine.Events.UnityEvent{System.Int32,System.Int32}