[SOLVED] Find all entities in scene that has a certain script attached to them

hi all,

i am looking for a way to get all entities in scene (also disabled ones) which has a certain script attached.
is there a way to do that? can i have a code example?

You know, it’s in docs for this: https://developer.playcanvas.com/en/api/pc.Entity.html#find
find by condition node.script && node.script.nameOfScript

Thank you!
got the solution.

1 Like