By cgarciae
on Mon, 10/06/2014 - 22:57
I have a `GameObject` that has a script called `AristaImageTarget` which implements the `ITrackableEventHandler` interface and contains a reference to an `ImageTargetBehaviour` which is a child it. The problem is that every time I delete `AristaImageTarget` I get this error MissingReferenceException: The object of type 'ImageTargetBehaviour' has been destroyed but you are still trying to access it. and the culprid seems to be the `ARCamera` according the console when I click on the error. So I decided to do this on `OnDestroy` on `AristaImageTarget` trackable.UnregisterTrackableEventHandler (this); Destroy (trackable); Where `trackable` is the reference to the `ImageTargetBehaviour`. But I still get the error :(