Skip to main content

UIHorizontalScrollView

Scrollable container that clips and scrolls its children horizontally.

Create in the Editor

  1. Ensure there is a UIController in the scene.
  2. Create a GameObject and add UIRect.
  3. Add the UIHorizontalScrollView component.

How to Use

  1. Get the component with myObject.findComponent(UIHorizontalScrollView.class).
  2. Read and write the component properties to control behavior.
  3. Test input or layout in Play mode.

Java Example

SpatialObject myObject = /* your object */;
UIHorizontalScrollView comp = myObject.findComponent(UIHorizontalScrollView.class);
if (comp != null) {
// set the scroll value:
comp.scroll = 1;
// read the scroll value:
int scrollValue = comp.scroll;

}