summaryrefslogtreecommitdiff
path: root/doc/classes/OS.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/OS.xml')
-rw-r--r--doc/classes/OS.xml22
1 files changed, 16 insertions, 6 deletions
diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml
index 15cc7b9b65..f4d48f5db2 100644
--- a/doc/classes/OS.xml
+++ b/doc/classes/OS.xml
@@ -31,12 +31,21 @@
[b]Note:[/b] This method is implemented on Linux, macOS and Windows.
</description>
</method>
+ <method name="create_instance">
+ <return type="int" />
+ <argument index="0" name="arguments" type="PackedStringArray" />
+ <description>
+ Creates a new instance of Godot that runs independently. The [code]arguments[/code] are used in the given order and separated by a space.
+ If the process creation succeeds, the method will return the new process ID, which you can use to monitor the process (and potentially terminate it with [method kill]). If the process creation fails, the method will return [code]-1[/code].
+ [b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and Windows.
+ </description>
+ </method>
<method name="create_process">
<return type="int" />
<argument index="0" name="path" type="String" />
<argument index="1" name="arguments" type="PackedStringArray" />
<description>
- Creates a new process that runs independently of Godot. It will not terminate if Godot terminates. The file specified in [code]path[/code] must exist and be executable. Platform path resolution will be used. The [code]arguments[/code] are used in the given order and separated by a space.
+ Creates a new process that runs independently of Godot. It will not terminate if Godot terminates. The path specified in [code]path[/code] must exist and be executable file or macOS .app bundle. Platform path resolution will be used. The [code]arguments[/code] are used in the given order and separated by a space.
If the process creation succeeds, the method will return the new process ID, which you can use to monitor the process (and potentially terminate it with [method kill]). If the process creation fails, the method will return [code]-1[/code].
For example, running another instance of the project:
[codeblocks]
@@ -49,7 +58,7 @@
[/codeblocks]
See [method execute] if you wish to run an external command and retrieve the results.
[b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and Windows.
- [b]Note:[/b] On macOS, sandboxed applications are limited to run only embedded helper executables, specified during export.
+ [b]Note:[/b] On macOS, sandboxed applications are limited to run only embedded helper executables, specified during export or system .app bundle, system .app bundles will ignore arguments.
</description>
</method>
<method name="delay_msec" qualifiers="const">
@@ -201,6 +210,7 @@
<return type="String" />
<description>
Returns the path to the current engine executable.
+ [b]Note:[/b] On macOS, always use [method create_instance] instead of relying on executable path.
</description>
</method>
<method name="get_granted_permissions" qualifiers="const">
@@ -455,11 +465,11 @@
</member>
</members>
<constants>
- <constant name="VIDEO_DRIVER_GLES2" value="0" enum="VideoDriver">
- The GLES2 rendering backend. It uses OpenGL ES 2.0 on mobile devices, OpenGL 2.1 on desktop platforms and WebGL 1.0 on the web.
+ <constant name="VIDEO_DRIVER_VULKAN" value="0" enum="VideoDriver">
+ The Vulkan rendering backend. It requires Vulkan 1.0 support and automatically uses features from Vulkan 1.1 and 1.2 if available.
</constant>
- <constant name="VIDEO_DRIVER_VULKAN" value="1" enum="VideoDriver">
- The Vulkan rendering backend.
+ <constant name="VIDEO_DRIVER_OPENGL_3" value="1" enum="VideoDriver">
+ The OpenGL 3 rendering backend. It uses OpenGL 3.3 Core Profile on desktop platforms, OpenGL ES 3.0 on mobile devices, and WebGL 2.0 on HTML5.
</constant>
<constant name="DAY_SUNDAY" value="0" enum="Weekday">
Sunday.