In a scene, I have a bunch of “fruit” scenes whose values should be randomized in a specific way. This should be done only within IDE, not within the launched project.
So instead of assigning all the values to all “fruit” manually (there are lots of them), I assigned them all to a group and:
- made a button
- wrote a script with a function that assigns parameters to all members of “fruit” group
- attached the script to the button
- turned the button into a tool.
However I can’t connect the function to button’s “button_down” signal obviously (because clicking on a button inside the IDE will just select it), so as a quick hack I connected the “hidden” signal to the function that does the assigning of parameters.
So now every time I hide / unhide the button this script is launched. This works perfectly! But it’s a bit hacky and silly having to turn the button’s visibility on/off every time I want to reassign these values. So I’m wondering: is there a way to turn a button into a properly functional button I can click on while in IDE and that I can use to automate some tasks like this one?