I’m working on my Euclidean TRPG Assistant (ETA) (https://playcanvas.com/editor/scene/700970), and I want to reference one of my buttons from another script. I’ve tried giving the button a unique tag (rulerButton) and referencing it by using node.findByTag as specified in https://developer.playcanvas.com/en/api/pc.Entity.html#findByTag .
However, when I do this, it throws an error: “Uncaught ReferenceError: node is not defined”. Here is my script for reference:
https://playcanvas.com/editor/code/600366?tabs=17191804&line=81&col=34&error=true
Note that I’ve also tried findByName(“Ruler_Button”), but it falsely claims that no such name exists.
Any help with this, or advice on an easier way to reference the button, would be greatly appreciated.