[SOLVED] How to query number of models sharing the same name or tag

Hello, there is a way to see in chrome how many models with the same tag or name there are in a scene?

Hi @ayrin,

You can easily to do in any script of yours or in the console:

// this will find all entities in scene with the provided tag
pc.Application.getApplication().root.findByTag('model');

// this will all entities in scene with the same name
pc.Application.getApplication().root.find(function(entity){
   return entity.name === 'Model';
});

If you writing this in your scripts, replace pc.Application.getApplication() with this.app, it will be easier to read.

1 Like

Tnx a lot