Hi,
The first option in actions to activate Game Objects in the Quest / Node Editor is Activate / Desactivate by GameObject's name, I was wondering if It can be quite resource consuming if you have a open word with thousands of gameobjects. I'm currently using messages and listeners but this option is much faster to implement.
Also, if by error you have 2 gameobjects with the same name, what's going on?
Thanks,
Activate GameObjects from quest editor
Re: Activate GameObjects from quest editor
Unity doesn't recommend searching for a GameObject by name every single frame, but it's fine as a one-time action. And in Unity 2018, they made it even faster by making transforms cache coherent.
If there are 2 GameObjects with the same name, it will use the first one it finds. It first searches active GameObjects:

If it doesn't find a match among the active GameObjects, it searches all inactive GameObjects -- but the inactive GameObject's root must be active:

It can be anywhere in the hierarchy as long as the root GameObject is active.
If there are 2 GameObjects with the same name, it will use the first one it finds. It first searches active GameObjects:

If it doesn't find a match among the active GameObjects, it searches all inactive GameObjects -- but the inactive GameObject's root must be active:

It can be anywhere in the hierarchy as long as the root GameObject is active.