> For the complete documentation index, see [llms.txt](https://vc-docs.gitbook.io/engine/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://vc-docs.gitbook.io/engine/home/doxygen_synced/classes/class_u_i.md).

# UI

**Usage:** `api.UI.SetColor(image, color)`

Wrappers around common uGUI components.

## Public Functions

|      | Name                                                                                                                                                                                                                                                                                                                         |
| ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| void | <p><a href="https://git.unimetaverse.net/vc-core-engine/doxygen/-/tree/main/Classes/Classes/class_u_i.md#function-setverticalnormalizedposition"><strong>SetVerticalNormalizedPosition</strong></a>(UnityEngine.UI.ScrollRect sr, int pos)<br>Sets the scroll view's vertical normalized position (0 = bottom, 1 = top).</p> |
| void | <p><a href="https://git.unimetaverse.net/vc-core-engine/doxygen/-/tree/main/Classes/Classes/class_u_i.md#function-verticaltoggle"><strong>VerticalToggle</strong></a>(UnityEngine.UI.ScrollRect sr, bool b)<br>Enables or disables vertical scrolling.</p>                                                                   |
| void | <p><a href="https://git.unimetaverse.net/vc-core-engine/doxygen/-/tree/main/Classes/Classes/class_u_i.md#function-horizontaltoggle"><strong>HorizontalToggle</strong></a>(UnityEngine.UI.ScrollRect sr, bool b)<br>Enables or disables horizontal scrolling.</p>                                                             |
| void | <p><a href="https://git.unimetaverse.net/vc-core-engine/doxygen/-/tree/main/Classes/Classes/class_u_i.md#function-setvaluetoggle"><strong>SetValueToggle</strong></a>(UnityEngine.UI.Toggle toggle, bool isOn)<br>Sets a toggle's on/off state directly.</p>                                                                 |
| void | <p><a href="https://git.unimetaverse.net/vc-core-engine/doxygen/-/tree/main/Classes/Classes/class_u_i.md#function-showmaskgraphic"><strong>ShowMaskGraphic</strong></a>(UnityEngine.UI.Mask mask, bool show)<br>Toggles whether a UI Mask's own graphic is drawn.</p>                                                        |
| void | <p><a href="https://git.unimetaverse.net/vc-core-engine/doxygen/-/tree/main/Classes/Classes/class_u_i.md#function-setcolor"><strong>SetColor</strong></a>(UnityEngine.UI.Image image, Color color)<br>Sets a UI image's color.</p>                                                                                           |

## Public Functions Documentation

### function SetVerticalNormalizedPosition

```csharp
static void SetVerticalNormalizedPosition(
    UnityEngine.UI.ScrollRect sr,
    int pos
)
```

Sets the scroll view's vertical normalized position (0 = bottom, 1 = top).

**Parameters**:

* **sr** The scroll rect.
* **pos** Normalized position.

### function VerticalToggle

```csharp
static void VerticalToggle(
    UnityEngine.UI.ScrollRect sr,
    bool b
)
```

Enables or disables vertical scrolling.

**Parameters**:

* **sr** The scroll rect.
* **b** True to enable vertical scrolling.

### function HorizontalToggle

```csharp
static void HorizontalToggle(
    UnityEngine.UI.ScrollRect sr,
    bool b
)
```

Enables or disables horizontal scrolling.

**Parameters**:

* **sr** The scroll rect.
* **b** True to enable horizontal scrolling.

### function SetValueToggle

```csharp
static void SetValueToggle(
    UnityEngine.UI.Toggle toggle,
    bool isOn
)
```

Sets a toggle's on/off state directly.

**Parameters**:

* **toggle** The toggle.
* **isOn** New state.

### function ShowMaskGraphic

```csharp
static void ShowMaskGraphic(
    UnityEngine.UI.Mask mask,
    bool show
)
```

Toggles whether a UI Mask's own graphic is drawn.

**Parameters**:

* **mask** The mask.
* **show** True to draw the mask graphic.

### function SetColor

```csharp
static void SetColor(
    UnityEngine.UI.Image image,
    Color color
)
```

Sets a UI image's color.

**Parameters**:

* **image** The image.
* **color** Color to apply.

***

Updated on 2026-07-22 at 12:00:00 +0800
