Hint: if you select an object in the editor, and then look at the properties underneath, there should be one showing the url
of that object. Try using that one when sending messages.
Judging by your error message it might be something like /collection3/img
or /collection3/root/img
or /root/img
. It depends on how you’ve set up your scene.
msg.post("/img", “enable”)
This tries to send a message to a game object at the root of the scene with id img
. The /
character at the beginning of the url means the root.
Correct, but it should not be necessary to specify the absolute url.
The the script (brazier.script?) is on the same level in the hierarchy as the target object it is simply enough to write:
msg.post("img", "enable")
2 Likes