Everything is working correctly, unless that i'm only able to see the canvas to each image once. Is there some way to reset this UpdateTrackedImages method when I enter the DisableMe() function? Tryed to set trackedImage to null but it didn't work... The canvas is the same to all of them, but the button will receive different information. And I should be able to come back to every one of them.
private void UpdateTrackedImages(IEnumerable<ARTrackedImage> trackedImages)
{
// If the same image (ReferenceImageName)
foreach (var trackedImage in trackedImages)
{
if (Chairs.Contains(trackedImage.referenceImage.name))
{
if (trackedImage.trackingState == TrackingState.Tracking)
{
Invoke("EnableMe", 0.5f);
}
if (trackedImage.trackingState != TrackingState.Tracking)
{
Invoke("DisableMe", 0.5f);
}
}
}
}
private void EnableMe()
{
canvas.enabled = true;
}
private void DisableMe()
{
canvas.enabled = false;
trackedImage = null;
}
I've tried to set trackedImage to null but it didn't work... The canvas is the same to all of them, but the button will receive different information. And I should be able to come back to every one of them.