Problem with more entities with same name

Hello, if i have more entities with the same name how can i identify it when clicking? if i use entity.getName i get the first entity in the hierarchy with that name but not the one i click…how do i solve this?
Edit: i remembrer is possible to get entity id but didn’t find anything…am i wrong?

Hi Ayrin,
Why do you need the name? If you are using raycast to click an entity then the result is the entity so you don’t really need the name.

    var from =, e.y,;
    var to =, e.y,;, to, function (result) {
        var pickedEntity = result.entity;


Mmmmh you are right mrLoganite, i was mislead by my mind. I didn’t see the solution before my eyes. thanks a lot.

1 Like