# HMI components (Pro)

{% hint style="warning" %}
Please install CINEMACHINE via the package manager. [Cinemachine ](https://doc.realvirtual.io/advanced-topics/usefull-addons#cinemachine)is needed for controlling the camera position for HMI messages. Please also make sure that "CINEMACHINE" is added as Scripting Define Symbols (`Project Setting > Player > Scripting Define Symbols`)
{% endhint %}

HMI components are prefabricated UI components used to create 3D interfaces for automation systems. They can be connected to signals and integrated with various PLC interfaces such as [S7TCP](/components-and-scripts/interfaces/s7-tcp.md), [TwinCAT](/components-and-scripts/interfaces/twincat.md), [TwinCAT HMI](/components-and-scripts/interfaces/twincat-hmi.md), [EthernetIP](/components-and-scripts/interfaces/ethernetip.md), [OPCUA ](/components-and-scripts/interfaces/opcua.md)and more.

<figure><img src="/files/HL4L3i7MFZzzgaZY816M" alt=""><figcaption><p>HMI example with error message</p></figcaption></figure>

## Overview

HMI components are organized into "Tabs" which are overlays on the 3D scene and can be opened and closed by buttons or certain events. All HMI components can be connected with Signals and by this the can control or display scene or machine data. Certain HMI components can utilize Unity's Cinemachine to manage multiple cameras and camera positions. To enable this functionality, ensure that you have the required [compile definition](/advanced-topics/compiler-defines.md) in place

The following components can be used for building individual HMI interfaces:

* [HMI Tab](/components-and-scripts/scene-interaction/hmi-components-pro/hmi-tab.md)
* [HMI Pushbutton](/components-and-scripts/scene-interaction/hmi-components-pro/hmi-puschbutton.md)
* [HMI Switch](/components-and-scripts/scene-interaction/hmi-components-pro/hmi-switch.md)
* [HMI Value](/components-and-scripts/scene-interaction/hmi-components-pro/hmi-value.md)
* [HMI Text](/components-and-scripts/scene-interaction/hmi-components-pro/hmi-text.md)
* [HMI Slider](/components-and-scripts/scene-interaction/hmi-components-pro/hmi-slider.md)
* [HMI Drop Down](/components-and-scripts/scene-interaction/hmi-components-pro/hmi-dropdown.md)
* [HMI Message](/components-and-scripts/scene-interaction/hmi-components-pro/hmi-message.md)

## Supported Use Cases

HMI components offer various use cases when combined with real machine controls. These include:

1. Displaying custom texts, such as IDs of machine components at 3D positions
2. Changing data on the industrial control by pushbuttons, sliders and pulldowns and switches
3. Representing sensor states as colored elements (booleans) at 3D positions
4. Showing values like axis positions and temperatures as 2D overlays or within the 3D scene
5. Presenting messages (normal, warning, and failure) that are connected to PLC outputs and inputs, allowing for acknowledgments. These messages can trigger specific 3D views and initiate custom animation sequences based on logical steps.

## Demo scene

The HMI demo scene contains most of the realvirtual.io HMI functions. You find the demo scene `realvirutal/professional/HMI/Demo/DemoHMI.` Within the Demo folder you find also a scene with an example how to set up your own HMI. The scene ["emptyHMIscene"](/components-and-scripts/scene-interaction/hmi-components-pro/start-your-own-hmi.md) is an example which can be used as a HMI prefab. The basic elements of this scene are available as prefabs.

<figure><img src="/files/yvDHlOCx8J8W9kdGENwM" alt=""><figcaption></figcaption></figure>

## Common properties

The following attributes are available at all interactive HMI components.

<div align="left"><figure><img src="/files/KUFHIgiWtw6PC4VOGrxY" alt=""><figcaption></figcaption></figure></div>

* `Color`: standard of the element when no user interaction
* `Color Mouse` Over: color when the mouse pointer is on the element
* `Alpha Visibility`: determine the occupancy of the element
* `EventOnValueChanged`: Unity event when the value of the connected signal is changing

### HMI Controller

The HMI controller must be added as a component to the topmost GameObject in the HMI area. It manages camera position changes and can also restrict mouse navigation for the user.

<div align="left"><figure><img src="/files/Z60W5bC7Czf8HSslDPhr" alt=""><figcaption></figcaption></figure></div>


---

# 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://doc.realvirtual.io/components-and-scripts/scene-interaction/hmi-components-pro.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.
