# 3D Buttons

<figure><img src="https://260262196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpYxFg97YnJX96UzNNTSd%2Fuploads%2Fgit-blob-780cf16631c5d3190212b9e6101085287b53b88f%2FScreenshot%202025-01-20%20142649.png?alt=media" alt="" width="375"><figcaption></figcaption></figure>

We provide 4 drag and drop prefrabs under realvirtual/3DPrefabs/ControlCabinet. Each button has at least one connected signal reflecting the current state of the button. In playmode, the user can simply toggle the state of each button by clicking it directly in the 3D space.

## EmergencyButton

<figure><img src="https://260262196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpYxFg97YnJX96UzNNTSd%2Fuploads%2Fgit-blob-987fafbb879cc258c154178ad98aca5e32817457%2FScreenshot%202025-01-20%20134908.png?alt=media" alt="" width="115"><figcaption></figcaption></figure>

The emergency button has a fairly simple set up. it has a connection to a PLCInputBool signal representing the current state of the button. Additionally the user can select if it is active when starting play mode.

<figure><img src="https://260262196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpYxFg97YnJX96UzNNTSd%2Fuploads%2Fgit-blob-558f1882e93bb1f0c671e9b42b2cad71251ef951%2FScreenshot%202025-01-20%20135643.png?alt=media" alt="" width="375"><figcaption></figcaption></figure>

## HandleSwitch

<figure><img src="https://260262196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpYxFg97YnJX96UzNNTSd%2Fuploads%2Fgit-blob-b80aad48913ab67eed30d303728b2b413ee0b4ec%2FScreenshot%202025-01-20%20134846.png?alt=media" alt="" width="127"><figcaption></figcaption></figure>

The handle switch behaves identically to the emergency button and has the same properties. The handle switch comes with a second variant sharing the same functionality.

<figure><img src="https://260262196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpYxFg97YnJX96UzNNTSd%2Fuploads%2Fgit-blob-bf369f60a901d79aab9e57ed844302ae2159e72e%2FScreenshot%202025-01-20%20142418.png?alt=media" alt="" width="141"><figcaption></figcaption></figure>

## PushButton

<figure><img src="https://260262196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpYxFg97YnJX96UzNNTSd%2Fuploads%2Fgit-blob-ef1d23512ab7f2b2695d052b5484b43f8a2df921%2FScreenshot%202025-01-20%20134824.png?alt=media" alt="" width="140"><figcaption></figcaption></figure>

The push button implements some additional features to the functionality described above.

Besides the state signal, the user can reference a light signal (PLCOutputBool). If the light signal is not set, the button light reflects the current state of the button, otherwise the light is controlled by the light signal.

<figure><img src="https://260262196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpYxFg97YnJX96UzNNTSd%2Fuploads%2Fgit-blob-e4182ef3ced12a4b2e1a9bad120f2174f0493986%2FScreenshot%202025-01-20%20135757.png?alt=media" alt="" width="375"><figcaption></figcaption></figure>

Additionally, the push button can not only act as a toggle but also as hold button. To enable the click and hold mode, simply turn off the Toggle option in the inspector.

<figure><img src="https://260262196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpYxFg97YnJX96UzNNTSd%2Fuploads%2Fgit-blob-4f388dfa5cc7fd2d105bba96485996ef198576cf%2FScreenshot%202025-01-20%20135818.png?alt=media" alt="" width="375"><figcaption></figcaption></figure>

The button will now only be active while the user is clicking and holding the button, onrelease the button turns of after a minimum total pushing time which is defined by the Timer in the inspector.

Moreover, the user can set the label text of the button by changing the label in the inpector.
