Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | jeangit | |
Old Version | Published before Godot 3 was released. |
Hello,
I’ve tried to use the possibilities of godot -s script.gd
, for writting tests without setting up a project and messing with the editor.
It seems to work, except the fact that i’d like to exit the main loop of Godot after the script has runned.
So for the moment , the best i could (with the help of IRC people) do is thac:
extends MainLoop
func _initialize():
print("It works... but doesn't quit")
finish() #does nothing
The script is run with godot -s
from the shell, but keeps running after the print
.
Do you have any idea for exiting cleanly ? Thank you.
Extending SceneTree instead of MainLoop works with quit()
, and finish()
throws a segfault, something may be wrong with that method.
eons | 2017-03-02 14:15
eons, it works perfectly with quit()
.
Thank you!
jeangit | 2017-03-02 14:55