Hi, I'm no AR expert. I have a doubt. In nearly all examples, an event called OnImageChanged is used. When is this event called? At the change of an image, compared to what? The one previously framed and recognized? For eample: Code (CSharp): using UnityEngine; using UnityEngine.XR.ARFoundation; public class ImageRecognition : MonoBehaviour { private ARTrackedImageManager _arImageManager; private void Awake() { _arImageManager = FindObjectOfType<ARTrackedImageManager>(); } public void OnEnable() { _arImageManager.trackedImagesChanged += OnImageChanged; } public void OnDisable() { _arImageManager.trackedImagesChanged -= OnImageChanged; } public void OnImageChanged(ARTrackedImagesChangedEventArgs args) { foreach(var trackedImage in args.added) { //....my operations } } } When "...my operations" is runned? I ask this because the OnImageChanged event is only run the first time. If I frame the same image a second time, it is not detected. I need my operations to be performed every time that image is framed. I also tried cleaning the args.added list but it still doesn't work.
When working with a tracked image, you will want to respond that image's tracking state (which might be added, updated, or removed, depending on your target platform and the state of your application). https://docs.unity3d.com/Packages/c...ge-manager.html#responding-to-detected-images In your specific example, you might want to add a check for args.updated as well.