Hi all. I have a template which is instantiated at runtime. Once its instantiated I try to find one of the entities contained within it that is called ‘Acc_Pos’ and also has a tag called ‘acc_position’
However if i do either of the following I just get undefined:
this.acc_position=this.app.root.findByTag("acc_position");
or this.acc_position=this.app.root.findByName("Acc_Pos");
I have no idea whats going on and unfortunately because Im working on an AR project I cant you the debug tools to inspect the graph. I actually attached a model to the ‘app_pos’ too which is clearly visible in the scene so I can only guess that when instantiating the template it has somehow changed the name and tag on its own?? Could that be possible?
Without a repro, it’s going to be tough. If it’s an AR project, if you have an Android device you can use Chromes remote device debug tools and examine the graph manually.
What I would start off with is doing this in isolation on a new project. Copy and paste the template asset to that project and try doing the same code as before to see if you can reproduce it.
The other thing I would check is after instantiating the template, are you adding it the scene (addChild to another entity in the scene)?
How do I examine the graph in Chrome://inspect? I can see my debug message clearly enough but cant figure out how to examine the graph.
The project is already very small but yes, when instatiantiating it I am adding it as a child to another entity in the scene, but findByName or findByTag should find it all all the same no?