summaryrefslogtreecommitdiff
path: root/doc/classes/OS.xml
diff options
context:
space:
mode:
authorHugo Locurcio <hugo.locurcio@hugo.pro>2020-02-07 19:51:50 +0100
committerHugo Locurcio <hugo.locurcio@hugo.pro>2021-05-07 00:05:02 +0200
commitce4aa07276f4772f86c9b2a38b49378ef991b981 (patch)
treec7d715ce2ed8aac99777260b384c3dfa643e1133 /doc/classes/OS.xml
parenta33a8f1e2919aa6c5793c52c74ca7fbf71a3aeba (diff)
Implement the `%command%` placeholder in the Main Run Args setting
This can be used to tell Godot to run an executable that will run Godot rather than running Godot directly. This is useful to make Godot start on the dedicated GPU when using a NVIDIA Optimus setup on Linux: `prime-run %command%` The `editor/run/main_run_args` setting declaration was moved to make it visible in the ProjectSettings documentation.
Diffstat (limited to 'doc/classes/OS.xml')
-rw-r--r--doc/classes/OS.xml2
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml
index 8c90108aef..d997073849 100644
--- a/doc/classes/OS.xml
+++ b/doc/classes/OS.xml
@@ -143,7 +143,7 @@
Returns the command-line arguments passed to the engine.
Command-line arguments can be written in any form, including both [code]--key value[/code] and [code]--key=value[/code] forms so they can be properly parsed, as long as custom command-line arguments do not conflict with engine arguments.
You can also incorporate environment variables using the [method get_environment] method.
- You can set [code]editor/main_run_args[/code] in the Project Settings to define command-line arguments to be passed by the editor when running the project.
+ You can set [member ProjectSettings.editor/run/main_run_args] to define command-line arguments to be passed by the editor when running the project.
Here's a minimal example on how to parse command-line arguments into a dictionary using the [code]--key=value[/code] form for arguments:
[codeblocks]
[gdscript]