# Timer

The timer prefab contains a Timer script with many customization options that can be used for various purposes.

The Timer script inspector will only show options that are applicable to the current settings.

![](/files/-MHoetspZY5MJUviLGmI)

| Timer Options   |                                                                          |
| --------------- | ------------------------------------------------------------------------ |
| Timer State     | Controls if the timer is *Counting* or *Disabled.*                       |
| Timer Type      | Controls if the timer will count-up, count-down, or count-up infinitely. |
| Start Time      | Time the timer will start from.                                          |
| Finish Time     | Time the timer will stop.                                                |
| Timer Speed     | Rate at which the timer adds or subtracts time.                          |
| Use System Time | Timer will run as a clock and output system time.                        |

![](/files/-MHofQyFurH1iMZs0gW2)

![](/files/-MHogDT4Bh8MF2-w-_Wj)

![](/files/-MHoiE-WXbG1oX-KthWD)

| Time Events | Create a list of custom events, the timer will trigger when the assigned time is reached. |
| ----------- | ----------------------------------------------------------------------------------------- |
| Event Name  | The name of the custom time event.                                                        |
| Event Time  | The time the event will be triggered.                                                     |
| Time Event  | The event that's invoked when the event time is reached.                                  |

![](/files/-MHohHxIVc2spLBk7Qed)

| **Time's Up Event Options** |                                                                           |
| --------------------------- | ------------------------------------------------------------------------- |
| Set Zero Timescale          | Sets Time.timescale to 0.                                                 |
| Times Up Event              | A UnityEvent that can trigger custom scripting functions when time is up. |

![](/files/-MHohgtK6w-hYpUC5GIL)

| UI Text Output     |                                                                             |
| ------------------ | --------------------------------------------------------------------------- |
| Text Type          | Assign a default Unity UI Text or Text Mesh Pro UGUI component.             |
| Timer Text Default | Assign a UI Text component to output a formatted string.                    |
| Timer Text TMPUGUI | Assign a Text Mesh Pro UGUI component to output a formatted string.         |
| Display Options    | Toggle specific time value fields in the output string.                     |
| Leading Zero       | Toggle the leading zero on specific time value fields in the output string. |

![](/files/-MHoeE3E4edgeXiO8ZjL)


---

# 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://timersandclocks.turnthegameon.com/api/untitled/timer.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.
