Godot Version
4.3
Context
- I’m developing on Windows using C# and VSCode
- I’ll define the
Editor GUI
for this question as the Godot Editor with the scene tree, inspector, etc - I’ll define the
Godot.exe
for this question asGodot_v4.3-stable_mono_win64.exe
My workflow is to develop in VSCode 99% of the time and only use the Editor GUI
when creating new scenes. This means I run/debug my game via a vscode launch command, which under the hood invokes the Godot.exe
; the Editor GUI
is not opened.
I’m aware of OS.HasFeature( "editor" )
, however, this returns true
even when starting the game via the Godot.exe
. This makes sense since it’s the same executable for opening the Editor GUI
.
Question
Is there a way to detect if I’m running in the Editor GUI
via the Play button (F5) versus a command line invocation of the Godot.exe
?
I’m assuming I could use OS.GetCmdlineArgs() and pass custom arguments, however, I’d like to know if there’s a built-in way of checking such a state.