> For the complete documentation index, see [llms.txt](https://ferdowsur.gitbook.io/modular-3d-text/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ferdowsur.gitbook.io/modular-3d-text/ui/input-field/script-documentation.md).

# Script documentation

InputField.cs in TinyGiantStudio.Text namespace

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

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

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

<table data-full-width="true"><thead><tr><th width="273">Variable</th><th width="164.33333333333337">Type</th><th>Description</th></tr></thead><tbody><tr><td><strong>autoFocusOnGameStart</strong></td><td>bool</td><td><em>If set to true, this 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>Text</strong></td><td>string</td><td><em>The current text in the inputfield.</em><br><em>Directly assigning the Text property makes a sound If it has both Audioclip and Audio Source.</em></td></tr><tr><td><strong>placeHolderText</strong></td><td>string</td><td><em>The text to show when the actual text to show is empty.</em><br><em>For example, if an input field for a username is empty, the placeholder can show "User name" to indicate to the user that this is a field for a username.</em></td></tr><tr><td><strong>maxCharacter</strong></td><td>int</td><td></td></tr><tr><td><strong>caret</strong></td><td>string</td><td></td></tr><tr><td><strong>hideCaretIfMaxCharacter</strong></td><td></td><td></td></tr><tr><td><strong>contentType</strong></td><td><a href="/modular-3d-text/ui/input-field/script-documentation/contenttype.md">ContentType</a></td><td></td></tr><tr><td><strong>textComponent</strong></td><td><a href="/modular-3d-text/text/modular-3d-text.md">Modular3DText</a></td><td></td></tr><tr><td><strong>enterKeyEndsInput</strong></td><td>bool</td><td></td></tr></tbody></table>

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

<table data-full-width="true"><thead><tr><th>Method</th><th></th></tr></thead><tbody><tr><td><a href="/modular-3d-text/ui/input-field/script-documentation/updatetext.md"><strong>UpdateText</strong></a></td><td></td></tr><tr><td><strong>InputComplete</strong> ()</td><td></td></tr><tr><td><strong>EmptyText</strong> ()</td><td></td></tr><tr><td><strong>Select</strong> ()</td><td></td></tr><tr><td><strong>Focus</strong> (<em>bool</em> <strong>enable</strong>)</td><td><p>There is a one-frame delay before this takes effect.</p><p><br>This is to avoid pressing the Enter key in one List and having the same Enter key applied to another UI that just got enabled by it on the same frame.</p></td></tr><tr><td><a data-footnote-ref href="#user-content-fn-1"><strong>FocusToggle</strong> </a>()</td><td></td></tr><tr><td><strong>OpenTouchScreenKeyboard</strong> ()</td><td></td></tr><tr><td><strong>CloseTouchScreenKeyboard</strong> ()</td><td></td></tr><tr><td><strong>Interactable</strong> ()</td><td></td></tr><tr><td><strong>Uninteractable</strong> ()</td><td></td></tr></tbody></table>

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

<table data-full-width="true"><thead><tr><th width="365">Variable</th><th width="187.33333333333337">Type</th><th>Description</th></tr></thead><tbody><tr><td><strong>onInput</strong></td><td>UnityEvent</td><td></td></tr><tr><td><strong>onBackspace</strong></td><td>UnityEvent</td><td></td></tr><tr><td><strong>onInputEnd</strong></td><td>UnityEvent</td><td></td></tr></tbody></table>

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

<table data-full-width="true"><thead><tr><th width="369">Variable</th><th width="180.33333333333337">Type</th><th>Description</th></tr></thead><tbody><tr><td><strong>background</strong></td><td>Renderer</td><td></td></tr><tr><td><strong>placeHolderTextMat</strong></td><td>Material</td><td></td></tr><tr><td><strong>inFocusTextMat</strong></td><td>Material</td><td></td></tr><tr><td><strong>inFocusBackgroundMat</strong></td><td>Material</td><td></td></tr><tr><td><strong>outOfFocusTextMat</strong></td><td>Material</td><td></td></tr><tr><td><a data-footnote-ref href="#user-content-fn-2"><strong>normalBackgroundMaterial</strong></a></td><td>Material</td><td></td></tr><tr><td><strong>disabledTextMat</strong></td><td>Material</td><td></td></tr><tr><td><strong>disabledBackgroundMat</strong></td><td>Material</td><td></td></tr><tr><td>hoveredBackgroundMaterial </td><td>Material</td><td></td></tr></tbody></table>

## <mark style="color:yellow;">Version History</mark>

### *<mark style="color:orange;">v4.2.0</mark> (Aug 31, 2023)*

1. outOfFocusBackgroundMat renamed to normalBackgroundMaterial
2. hoveredBackgroundMaterial has been added
3. FocusToggle() has been added.

### *<mark style="color:orange;">v4.0.3</mark> (June 2, 2023)*

* Added method **OpenTouchScreenKeyboard()** and **CloseTouchScreenKeyboard()**

[^1]: Added in v4.2.0

[^2]: renamed from outOfFocusBackgroundMat in version 4.2.0
