# Script documentation

*If anything except method names starts with a capital letter, it's a property.*

## *<mark style="color:yellow;">Utility</mark>*

### *<mark style="color:orange;">Variables</mark>*

<table data-full-width="true"><thead><tr><th width="241">Variable</th><th width="179.33333333333331">Type</th><th>Description</th></tr></thead><tbody><tr><td><strong>CurrentValue</strong></td><td>float</td><td><em>The current value.</em></td></tr><tr><td><strong>CurrentPercentage</strong></td><td>float</td><td><em>Returns the current value in percentage.</em></td></tr><tr><td><strong>minValue</strong></td><td>float</td><td><em>The minimum value allowed by the slider.</em></td></tr><tr><td><strong>maxValue</strong></td><td>float</td><td><em>The maximum value allowed by the slider.</em></td></tr><tr><td></td><td></td><td></td></tr><tr><td><strong>autoFocusOnGameStart</strong></td><td>bool</td><td><em>If set to true, the slider is focused on awake. The slider is scrollable with a keyboard when focused.</em><br><em>If it is in a list, the list controls who to focus on.</em></td></tr><tr><td><strong>interactable</strong></td><td>bool</td><td><em>As the name suggests, if it isn't interactable nothing can interact with it and it gets ignored in a list.</em></td></tr><tr><td><strong>directionChoice</strong></td><td>int</td><td><em>0 is left to right</em></td></tr></tbody></table>

### *<mark style="color:orange;">Methods</mark>*

<table data-full-width="true"><thead><tr><th width="308">Method</th><th>Description</th></tr></thead><tbody><tr><td><a href="/pages/S6EU9BNJd4RGxhxBgS8q"><strong>UpdateValue</strong></a></td><td></td></tr><tr><td><a href="/pages/dcPl03NIv10ELT3xdfh9">IncreaseValue</a></td><td></td></tr><tr><td><a href="/pages/jixcAm9h0pjlkKLdV74e">DecreaseValue</a></td><td></td></tr><tr><td><strong>Focus</strong> (<em>bool</em> <strong>enable</strong>)</td><td><em>Changes the current focus state to the parameter.</em></td></tr><tr><td><a href="/pages/SkTn3c5CLt9yog54I89x"><em>List</em> </a><strong>GetParentList</strong> ()</td><td><em>Returns the parent</em> <a href="/pages/SkTn3c5CLt9yog54I89x"><em>list</em></a> <em>if one exists.</em></td></tr><tr><td><strong>Interactable</strong> ()</td><td><em>Sets slider to interactable</em></td></tr><tr><td><strong>Uninteractable</strong> ()</td><td><em>Sets slider to uninteractable.</em></td></tr><tr><td><strong>GetCurrentValueFromHandle</strong> ()</td><td><em>Updates the value of the slider according to position of the handle.</em><br><em>Used by raycast selector to update the value after dragging handle.</em></td></tr></tbody></table>

## *<mark style="color:yellow;">Events</mark>*

### *<mark style="color:orange;">Variables</mark>*

<table data-full-width="true"><thead><tr><th width="258">Variable</th><th width="175.33333333333331">Type</th><th>Description</th></tr></thead><tbody><tr><td><a href="/pages/1LJvCzFVz0qnyIdtdZAq#value-range-events"><strong>useValueRangeEvents</strong></a></td><td>bool</td><td></td></tr><tr><td>usePercentage</td><td>bool</td><td>If set to true, uses percentage value to evaluate Value Range Events.</td></tr><tr><td>valueRangeEvents</td><td>List&#x3C;ValueRange></td><td></td></tr></tbody></table>

### *<mark style="color:orange;">Methods</mark>*

<table data-full-width="true"><thead><tr><th>Method</th><th>Description</th></tr></thead><tbody><tr><td><strong>ValueChanged ()</strong></td><td><em>Calls events after value is changed.</em></td></tr><tr><td>NewValueRange ()</td><td>Creates new value range event</td></tr></tbody></table>

## *<mark style="color:yellow;">Visual</mark>*

### *<mark style="color:orange;">Variables</mark>*

<table data-full-width="true"><thead><tr><th width="251.33333333333331">Variable</th><th width="189">Type</th><th>Description</th></tr></thead><tbody><tr><td><strong>handle</strong></td><td>SliderHandle</td><td></td></tr><tr><td><strong>progressBar</strong></td><td>Transform</td><td></td></tr><tr><td><strong>progressBarPrefab</strong></td><td>GameObject</td><td></td></tr><tr><td><strong>background</strong></td><td>Transform</td><td></td></tr><tr><td><strong>backgroundSize</strong></td><td>float</td><td></td></tr><tr><td></td><td></td><td></td></tr><tr><td><strong>unSelectedHandleMat</strong></td><td></td><td></td></tr><tr><td><strong>selectedHandleMat</strong></td><td></td><td></td></tr><tr><td><strong>clickedHandleMat</strong></td><td></td><td></td></tr><tr><td><strong>disabledHandleMat</strong></td><td></td><td></td></tr></tbody></table>

### *<mark style="color:orange;">Methods</mark>*

<table data-full-width="true"><thead><tr><th width="280.3333333333333">Method</th><th>Description</th></tr></thead><tbody><tr><td><strong>UpdateGraphic</strong> ()</td><td></td></tr><tr><td><strong>SelectedVisual</strong> ()</td><td></td></tr><tr><td><strong>UnSelectedVisual</strong> ()</td><td></td></tr><tr><td><strong>ClickedVisual</strong> ()</td><td></td></tr><tr><td><strong>DisabledVisual</strong> ()</td><td></td></tr><tr><td><strong>UpdateBackgroundSize</strong> ()</td><td></td></tr></tbody></table>

## *<mark style="color:yellow;">Input</mark>*

<table data-full-width="true"><thead><tr><th width="169.33333333333331">Variable</th><th width="115">Type</th><th>Description</th></tr></thead><tbody><tr><td><strong>keyStep</strong></td><td>float</td><td><em>Controls how fast the slider moves on input.</em></td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ferdowsur.gitbook.io/modular-3d-text/ui/slider/script-documentation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
