# Runtime UI Setup

{% hint style="info" %}
Please also have a look at the demo scene.\
The RuntimeProgressTest class assigned to the \_DEMO gameObject in the demo scene handles all important aspects, like starting a research and listening to events.
{% endhint %}

The runtime setup of a Progress Graph consists of three components:

* **Progress Controller (In the scene)**\
  Controls the loading of a graph, as well as starting a research
* **Progress Graph UI Controller  (In the scene)**\
  Builds the actual graph
* **Progress Node UI Element**\
  The actual UI Node. Handles UI Interaction and starts a new research on mouse click.

You can of course <mark style="background-color:orange;">create your own ProgressGraphUIController</mark> if you like to build your graph differently.\
Simply make sure to implement the <mark style="background-color:orange;">IProgressGraphUIControl</mark> interface to your custom class and assign the GameObject which has the custom class to the ProgressController ProgressUIControl field in the inspector.

## Progress Controller

<div align="left"><figure><img src="https://2348672745-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIoqF5QAgQsqxrjmTIKpE%2Fuploads%2FWai8WP9bMdIUdGEUfgTv%2Fprogress_controller.jpg?alt=media&#x26;token=ffc2337d-3ba5-4559-9c12-14483db55cd7" alt=""><figcaption></figcaption></figure></div>

The ProgressController contains multiple methods which allows you to control a Progress Graph like starting a research or listening to specific events.\
Make sure to have a reference to the ProgressController script to control your graph.\
Please have a look at the API section to see all available methods and events.

{% content-ref url="api/progresscontroller" %}
[progresscontroller](api/progresscontroller)
{% endcontent-ref %}

* Progress Graph: The assigned Progress Graph (can be switched at runtime)
* Progress UI Control: The GameObject which controls the actual Progress Graph UI. Must implement the IProgressGraphUIControl interface.
* Load On Start: If true, the graph will be loaded directly on start.
