You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
60d2c1f removed OS.set_exit_code() but it had a valid use case for setting the exit code from MainLoop.
I suggest adding MainLoop.set_exit_code() since MainLoop has no .quit() where you can provide the exit code.
Steps to reproduce
godot -s main_loop.gd
extends MainLoop
func _process(delta):
# No longer have any way to accomplish this
# OS.set_exit_code(1)
# workaround?
var st := SceneTree.new()
st.quit(1)
st.free()
return true
Tested versions
System information
Godot v4.2.1.stable - Ubuntu 22.04.4 LTS 22.04 - X11 - Vulkan (Forward+) - integrated Intel(R) Graphics (ADL GT2) () - 12th Gen Intel(R) Core(TM) i7-12700H (14 Threads)
Issue description
60d2c1f removed OS.set_exit_code() but it had a valid use case for setting the exit code from MainLoop.
I suggest adding MainLoop.set_exit_code() since MainLoop has no
.quit()
where you can provide the exit code.Steps to reproduce
godot -s main_loop.gd
Minimal reproduction project (MRP)
main_loop_exit_code.zip
The text was updated successfully, but these errors were encountered: