Would you be able to provide a project or more code on what is being done there as I can’t see what is being done with the GLB asset nor what visibleEnt is.
In other word,I got a car in the scene,and this car shows well(include glb models and some materials).
then I use ‘findByName()’ to get a door entity whose name is ‘door_fl’.
In the car entity,door_fl entity is normal,and I consoled Its hirachy which is as second picture shows,it has its model and materials.
but when I use this code to get door_fl entity:
var door_fl_entity = carEnt.findByName('door_fl');
I found that its hirachy shows as the first picture,which is the same as only glb models.
The phenomenon is that I got a child entity from a father entity,but this child entity is different from the entity in the father’s,this happens only occasionally,all I used is ‘findByName()’ and glb models.
I have considered whether the father entity was changed by me when I took the child entity from the father entity. However, by printing the log, I found that the hierarchy tree in the father entity is normal and unchanged, but the child entity taken out is different from the child entity in the father entity.
I solved this problem just now,I just changed the name of child entity to be ‘door_flL’.I know it shows that there maybe other entity named ‘door_fl’,what I can say is I have checked it by logging app.root before,and I am prety sure there is only one entity who named ‘door_fl’.but I did not compare the results of the two methods with code you mentioned,maybe I should. and I will do this to check it in the afternoon.
thank you very much!