It should be as it is given a direct reference to the entity (O(1)) and findByName()
does a linear search through all the children (O(n)).
Have you checked the user manual here? https://developer.playcanvas.com/en/user-manual/scripting/script-attributes/
Scroll down to ‘Entity attribute’
Ok found the way or so i thought, i now have pc.script.attribute(‘Root’, ‘entity’) and pointed it at Root entity, then i tried call it with this.Root.script.Output but it say Uncaught TypeError: Cannot read property ‘script’ of undefined
EDIT: was my mistake solved and works
Uhm it’s early to tell but seems that after polishing 2 scripts the frame rate went up a bit, Tomorrow when most of the work will be done i will update you.