Version hint feature enables Godots to properly detect wich version of Godot Engine a project requires. The hint consists of:
- version (4.0 or 4.0.1)
- stage (stable, dev, beta..) - default value is
stable - optional
monoarg
"x.x.x-stage-mono"
"x.x.x-stage"
e.g.
"4.1.2-stable-mono"
"4.1" # the same as (4.1-stable)
"4.1-mono" # the same as (4.1-stable-mono)To set the project hint, press Rename button in project actions.
or edit
project.godotfile manually:
# res://project.godot file:
..
[godots]
version_hint=4.1.2
..To set the editor hint, press Rename button in editor actions.
By default the hint is extracted from editor name:
"Godot v4.2 beta4 mono" => "v4.2-beta4-mono".godot-version file is used only in cli mode if project.godot was not provided (useful for running scripts).
to setup the file just create one and fill it with version_hint
# .godot-version file:
4.1-stable
Godots v1.2 introduces cli support.
It is recommended to place your
Godotsbinary in yourPATHenvironment variable, so it can be executed easily from any place by typinggodots
godots exec -- <args>
e.g.
godots exec --headless -- -q --headless --export-release "Windows Desktop"
Depending on the context, Godots tries to recognize what editor the args should be passed to and pass them to it.
To find the editor, Godots analyzes args, if they are provided (for instance
godots exec -- --path path/to/project
godots exec -- path/to/scene.tscn
godots exec -- -s path/to/script.gd
or it looks up to Working Dir in order to find either project.godot or .godot-version and read the version_hint from them.
Note: if -u|--upwards is in
args, Godots will analyze folders upwards in order to findproject.godotor.godot-version
To specify the editor manually:
# -n | --name
godots exec -n "editor name" -- -p
# -vh | --version-hint
godots exec -vh "version_hint" -- -p
# can be combined to achieve AND look up behaviour
godots exec -n "editor name" -vh "version_hint" -- -e
Open last edited project.
godots -r
godots --recent
godots editor list
To see all the available commands type
godots -gh
godots --ghelp
By default, there are two commands for project (Run, Edit) and one for editor (Run).
Commands are able to be activated via RMB click on item:
Also there is an option 'Edit Commands' (within named section 'Commands') that enables you to create custom commands or edit default ones (Run, Edit). For instance, command to open the project in terminal:
The command uses {{PROJECT_DIR}} variable, the full list of them:
| Variable | Description | Scope |
|---|---|---|
| {{PROJECT_DIR}} | the project directory | project |
| {{EDITOR_DIR}} | the editor directory | editor project |
| {{EDITOR_PATH}} | the bind editor | editor itself bin path | editor project |

