TextStudioPageUtility
public static class TextStudioPageUtilityShared TMP page-overflow helpers for renderers and decorations.
Fields
Section titled “Fields”
NoPageFilter
Section titled “NoPageFilter”public const int NoPageFilter = -1Sentinel meaning page filtering is inactive.
Returns
System.Int32
Methods
Section titled “Methods”
GetDisplayedPageIndex(TMP_Text)
Section titled “GetDisplayedPageIndex(TMP_Text)”public static int GetDisplayedPageIndex(TMP_Text tmpText)Returns the zero-based displayed page when overflow is TMPro.TextOverflowModes.Page;
otherwise TextStudio.TextStudioPageUtility.NoPageFilter.
Parameters
| Name | Type |
|---|---|
tmpText |
TMPro.TMP_Text |
Returns
System.Int32
IsDisplayedPage(in TMP_CharacterInfo, int)
Section titled “IsDisplayedPage(in TMP_CharacterInfo, int)”public static bool IsDisplayedPage(in TMP_CharacterInfo character, int displayedPage)Reports whether a character belongs to the displayed page, or always true when filtering is inactive.
Parameters
| Name | Type |
|---|---|
character |
TMPro.TMP_CharacterInfo |
displayedPage |
System.Int32 |
Returns
System.Boolean
IsDisplayedPage(int, int)
Section titled “IsDisplayedPage(int, int)”public static bool IsDisplayedPage(int pageNumber, int displayedPage)Reports whether a stored page index belongs to the displayed page, or always true when filtering is inactive or the page is unknown.
Parameters
| Name | Type |
|---|---|
pageNumber |
System.Int32 |
displayedPage |
System.Int32 |
Returns
System.Boolean
GetPageCount(TMP_Text)
Section titled “GetPageCount(TMP_Text)”public static int GetPageCount(TMP_Text tmpText)Returns TMP’s laid-out page count, clamped to at least one.
Parameters
| Name | Type |
|---|---|
tmpText |
TMPro.TMP_Text |
Returns
System.Int32