Hello,
I attached the script below to a Spatial node. When I run it (checking the 'runScript' box), it adds the node to 'myGroup' and prints 'yes'. But nothing appears in the editor. How can I make it visible in the editor? Thanks for your help.
tool
extends Spatial
export(bool) var runScript = false setget onChecked
func _ready():
pass
func onChecked(checked):
if checked:
runScript = false
self.add_to_group('myGroup')
if self.is_in_group('myGroup'):
print('yes')
else:
print('no')