989onan bot (talk | contribs) Automated: update SyncDelegates |
989onan bot (talk | contribs) Automated: update SyncDelegates |
||
Line 25: | Line 25: | ||
== Sync Delegates == | == Sync Delegates == | ||
{{Table ComponentTriggers | {{Table ComponentTriggers | ||
|MoveToTop[[Type:Action|Action]]|[[Type:Action|Action]]|false| Moves the scroll view to the top. | |MoveToTop:[[Type:Action|Action]]|[[Type:Action|Action]]|false| Moves the scroll view to the top. | ||
|MoveToBottom[[Type:Action|Action]]|[[Type:Action|Action]]|false| Mobes the scroll view to the bottom. | |MoveToBottom:[[Type:Action|Action]]|[[Type:Action|Action]]|false| Mobes the scroll view to the bottom. | ||
|MoveToLeft[[Type:Action|Action]]|[[Type:Action|Action]]|false| Moves the scroll view to the left. | |MoveToLeft:[[Type:Action|Action]]|[[Type:Action|Action]]|false| Moves the scroll view to the left. | ||
|MoveToRight[[Type:Action|Action]]|[[Type:Action|Action]]|false| Moves the scroll view to the right. | |MoveToRight:[[Type:Action|Action]]|[[Type:Action|Action]]|false| Moves the scroll view to the right. | ||
}} | }} | ||
Latest revision as of 06:32, 17 March 2025
Component image 
ScrollRect component as seen in the Scene Inspector

The ScrollRect component is for making the contents of this Slot (such as child objects with RectTransforms) scrollable.
The scrollRect will not do any clipping on its own. If it is a child of an object with a Mask component, it effectively becomes a window into the scrolled content.
Name | Type | Description |
---|---|---|
persistent
|
Bool | Determines whether or not this item will be saved to the server. |
UpdateOrder
|
Int | Controls the order in which this component is updated. |
Enabled
|
Bool | Controls whether or not this component is enabled. Some components stop their functionality when this field is disabled, but some don't. |
NormalizedPosition
|
Float2 | The scroll position between (0,0) and (1,1) with (0,0) being the lower left corner. |
HorizontalAlign
|
LayoutHorizontalAlignment | Aligns the scrollrect's contents horizontal. |
VerticalAlign
|
LayoutVerticalAlignment | Aligns the scrollrect's contents vertically. |
ViewportOverride
|
RectTransform | Overrides the viewport of this scrollrect. |
__legacyContent
|
RectTransform | Internal - Used for the content of the scrollrect. |
Sync Delegates
Method Name | Method type and Arguments. | Is the method hidden? | Description |
---|---|---|---|
MoveToTop:Action
|
Action | X | Moves the scroll view to the top. |
MoveToBottom:Action
|
Action | X | Mobes the scroll view to the bottom. |
MoveToLeft:Action
|
Action | X | Moves the scroll view to the left. |
MoveToRight:Action
|
Action | X | Moves the scroll view to the right. |
Usage
This is useful when you have a lot of text or other UIX elements that you want to be scrollable, much like how a webpage has a lot of content that can't fit in just one screen.
Examples
Videos
ProbablePrime's tutorial video on the scrollrect component: