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.

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.

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.

Last updated