# OVER\_ArImageTargetListener

The **ArImageTargetListener** preset creates an object in Unity with the **OverARImageTargetEventListenerUVS** script attached. This script is specifically designed to detect when an **AR Image Target** is found or lost during an AR session. It provides a simple and efficient way to trigger custom behaviors based on the visibility of specific images in the real-world environment.

<figure><img src="/files/AUJel0tf12K5XTGm96Kw" alt="" width="248"><figcaption></figcaption></figure>

The **OverARImageTargetEventListenerUVS** script listens for two key events related to **AR Image Targets** :

* **EventTargetImageFound** : Triggered when an AR Image Target is detected in the camera view.
* **EventTargetImageLost** : Triggered when the AR Image Target is no longer visible in the camera view.

These events are exposed through Unity’s **UnityEvent** system, allowing you to define custom behaviors directly in the Inspector. Additionally, the script integrates seamlessly with **Unity Visual Scripting** , enabling you to visually design complex logic and responses without writing code.

<figure><img src="/files/kaEoROBBhOx7i2Vkedmb" alt="" width="375"><figcaption></figcaption></figure>

**Simulate Events in the Inspector**

To help you test and debug your AR interactions, the **OverARImageTargetEventListenerUVS** script includes a **Simulate** section in the Inspector. This feature allows you to manually trigger the events without needing to run the application on a physical device:

* Select the event you want to simulate (**EventTargetImageFound** or **EventTargetImageLost** ) from the dropdown menu.
* Press the **Trigger Event** button to simulate the selected event and observe how your custom behaviors respond in the Unity Editor.

This simulation capability is particularly useful during development, as it saves time by allowing you to test your interactions without relying on real-world AR conditions.

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


---

# 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/sdk-window/presets/over_arimagetargetlistener.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.
