Hello,
I am loading the model target data set dynamically. The data set loads and activates and detects the target. And then am attaching the DefaultTrackableEventHandler script to get the OnTargetFound Unity Event. The Addlistener for the event throws a null reference exception.
Also, when the "New Game Object" instantiates, which has the ModelTargetBehaviour script attached. On clicking the object in the hierarchy the following error occurs. Image attached:
Attachment | Size |
---|---|
![]() | 177.8 KB |
Hi,
In the Core Sample app we have the ModelTargetBehaviour running with the DefaultTrackableEventHandler and you have the option OnTrackingFound().
Please review our Core Sample app on how we implemented it.
Also you do not need to attach the DefaultTrackableEventHandler to the MT as it is already present when you create the MT GameObject. Maybe this is why you get this errors.
Thank you.
Vuforia Engine Support