Multi image target error

0 votes
asked Jul 19, 2019 by iserofeev (120 points)

Have some troubles with image tracking in unity. When i try to use more than one marker, i see: 

"NullReferenceException: Object reference not set to an instance of an object
easyar.ImageTracker.unloadTarget (easyar.Target target, easyar.CallbackScheduler callbackScheduler, System.Action`2 callback) (at Assets/EasyAR/Scripts/csapi.cs:4687)".

 But when i use any only one of my three markers, everything works fine. Solution?

I think that markers destroys, before they added to traklist. But I don't know why.

1 Answer

0 votes
answered Jul 21, 2019 by zhangpengar (3,060 points)
There is a possibility with the order of destruction as that ImageTargetController is supposed to be destroyed before ImageTrackerBehaviour Is destroyed.

And for multiple markers, you can refer to HelloAR_Multi_ImageTarget sample.
Welcome to EasyAR SDK Q&A, where you can ask questions and receive answers from other members of the community.
...