Runtime Target changed in Augmented Reality

0 votes
asked Nov 21, 2017 by ankitak71 (140 points)
Hi, I am doing demo on Runtime target change in EasyAR. And it changed first time but after second target change it still scanning first target . I changed target and material of ImageTargetBehaviour using following code :

imageTarget.GetComponent<ImageTargetBehaviour>().Path=_reader ["Obj"].ToString()+".jpg";

imageTarget.GetComponent<ImageTargetBehaviour>().Name = _reader ["Obj"].ToString();

imageTarget.GetComponent<Renderer>().material=Resources.Load(_reader ["Obj"].ToString(), typeof(Material)) as Material;

Anyone tried like this? Please help me.

2 Answers

0 votes
answered Nov 24, 2017 by albert52 (31,850 points)
Hi

I'm sorry to reply you so late.

Which thread or time do you use this method?

Could you give me more details?
0 votes
answered Nov 26, 2017 by nicmds (420 points)
I change my targets in Runtime simply saving the new image that I want to use over the older one, keeping the name aways the same.

If I had an Mario Block as ImageTarget.jpg and want to change it to the Mushroom, I save the Mushroom as the new ImageTarget.jpg (path being the persistent datapath of the device).
Welcome to EasyAR SDK Q&A, where you can ask questions and receive answers from other members of the community.
...