Log in or register to post comments

UserDefinedTarget - Reference of the Instantiated Target

August 7, 2013 - 1:32am #1

Hi i'm developing a sample application based on the UserDefinedTarget Example. After digging in the code i find out that it just create a new instance of the referenced object in UserDefinedTargetEventHandler. I would like to get the reference of the new created clone because i would like to attach a 3d model afterward. Because the QCARWrapper has no documentation I would like to know it provides such a reference. 

--- Thank u in advace.

UserDefinedTarget - Reference of the Instantiated Target

August 9, 2013 - 3:21am #5

Thanks for sharing :)

N

UserDefinedTarget - Reference of the Instantiated Target

August 9, 2013 - 3:19am #4

The solution is really easy, i associated a Tag to the UserDefinedTarget Object, so that by using GameObject.FindGameObjectsWithTag() i can get all the objects with that Tag. In the end, to know which is the last target created, i used the variable mCurrentTargetName (which is unique) in the UserDefinedTargetEventHandler. It would be better to have a reference but i think that this is a really good work-around :)
Let me know If u have some advice.

 

UserDefinedTarget - Reference of the Instantiated Target

August 7, 2013 - 8:07am #3

Care to share your solution?

N

UserDefinedTarget - Reference of the Instantiated Target

August 7, 2013 - 5:26am #2

Solved ty 

Log in or register to post comments