ScrollToSelection
Class in Zigurous.UI
Declaration
public class ScrollToSelection : MonoBehaviour
Description
Handles scrolling a ScrollRect component to the selected child element. This is especially useful for controller support.
Properties
scrollRect | The ScrollRect component being scrolled (Read only). |
scrollTransform | The RectTransform component of the scroll rect (Read only). |
selectedGameObject | The current selected game object (Read only). |
selectedTransform | The RectTransform of the current selected game object (Read only). |
scrollDirection | The direction to scroll the ScrollRect. |
scrollSpeed | How quickly the ScrollRect scrolls. |
manualScrolling | Whether the ScrollRect is currently being scrolled manually. This allows the user to freely scroll with the mouse even when a child element is selected (Read only). |