# Cooking with Clicks: Mastering Over Clickable Objects in AR

{% hint style="info" %}
The 'UVS' in **OverClickableObjectUVS** stands for **Unity Visual Scripting** , distinguishing it from the older, The **OverClickableObjectUVS** component includes 'UVS' in its name, which stands for **Unity Visual Scripting** , distinguishing it from the older, legacy implementation. This naming convention ensures clarity and helps users identify the correct component for modern workflows.
{% endhint %}

The **OverClickableObjectUVS** is a scriptable component that detects user interactions on 3D objects and communicates these interactions to your **Visual Scripting graph** . It supports three core interaction types:

* **Click** : Triggered when the user taps or clicks the object briefly.
* **Press** : Triggered when the user presses and holds the object.
* **Long Press** : Triggered when the user holds the object for an extended duration.

These interactions are sent as **events** to your visual scripting graph, where you can define custom behaviors such as animations, sound effects, UI updates, or other gameplay mechanics.

### **How to Use**

* **To make a 3D object interactive:**
  * Select the 3D object in the Unity Hierarchy.
  * Click **Add Component** in the Inspector panel and search for **OverClickableObjectUVS** .
  * Alternatively, right-click in the Hierarchy, navigate to **OVER > Preset > OVER\_ClickableObject** , and add it directly.

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

* **Set Up Visual Scripting**
  * Add or modify a **Visual Scripting graph** in Unity:
    * Right-click in the Hierarchy and navigate to **OVER > Unity Visual Scripting > Graph** to create a new graph, or modify an existing one.
  * Add a **UnityEvent** node for each needed interaction type (e.g., `click`, `press`, `longPress`).

<figure><img src="/files/296KBNbzhlmiKcIzZl8N" alt="" width="113"><figcaption></figcaption></figure>

* **Configure the Component**
  * In the **Inspector panel** , configure the properties of the **OverClickableObjectUVS** :
    * Attach the **Visual Scripting graph** where the **UnityEvent** nodes are defined.
    * For each event, select the function **Script Machine > TriggerUnityEvent** and set the corresponding event name (e.g., `OnClick`, `OnPress`, `OnLongPress`).

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

* **Test in Play Mode**
  * In **Play Mode** , simulate interactions by selecting the desired event in the **Inspector** .
  * Press the **"Trigger Event"** button to test how the object responds to clicks, presses, or long presses.

<br>


---

# 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://docs.overthereality.ai/over-sdk-manual/cook-book/cooking-with-clicks-mastering-over-clickable-objects-in-ar.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.
