Loading...
Searching...
No Matches
realvirtual.rvUIText Class Reference
Links the RectTransform size to the TextMeshPro text size with optional padding. More...
Inheritance diagram for realvirtual.rvUIText:
Public Member Functions | |
| override void | RefreshLayout () |
| void | SetText (string text) |
Public Member Functions inherited from realvirtual.rvUIContent | |
| void | RefreshLayout () |
| void | RefreshLayoutRecursive () |
| void | RefreshLayoutBottomUp () |
| List< rvUIContent > | GetChildContents () |
| void | MoveToContainer (rvUIContainer container, bool refresh=true) |
| rvUIContainer | GetContainer () |
| List< rvUIContent > | GetPathToRoot () |
| void | ApplyColorScheme (ColorScheme colorScheme) |
Public Attributes | |
| string | text |
| bool | useWidth |
| Synchronize the width dimension with text width. | |
| float | defaultWidth |
| Default width if useWidth is false. | |
| bool | useHeight |
| Synchronize the height dimension with text height. | |
| float | defaultHeight |
| Default height if useHeight is false. | |
| Vector2 | padding |
| Additional padding to add to the text size. | |
| bool | updateInRuntime |
| Update the size continuously during runtime (performance cost) | |
| UnityEvent | OnEmptyText |
| UnityEvent | OnNonEmptyText |
Public Attributes inherited from realvirtual.rvUIContent | |
| UnityEvent< ColorScheme > | OnApplyColorScheme |
Detailed Description
Links the RectTransform size to the TextMeshPro text size with optional padding.
Automatically adjusts the GameObject's RectTransform dimensions to match the rendered text size, useful for creating dynamic UI elements that adapt to text content.
Member Data Documentation
◆ defaultHeight
| float realvirtual.rvUIText.defaultHeight |
Default height if useHeight is false.
◆ defaultWidth
| float realvirtual.rvUIText.defaultWidth |
Default width if useWidth is false.
◆ padding
| Vector2 realvirtual.rvUIText.padding |
Additional padding to add to the text size.
◆ updateInRuntime
| bool realvirtual.rvUIText.updateInRuntime |
Update the size continuously during runtime (performance cost)
◆ useHeight
| bool realvirtual.rvUIText.useHeight |
Synchronize the height dimension with text height.
◆ useWidth
| bool realvirtual.rvUIText.useWidth |
Synchronize the width dimension with text width.
Public Member Functions inherited from