diff options
Diffstat (limited to 'doc/classes/Engine.xml')
-rw-r--r-- | doc/classes/Engine.xml | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/doc/classes/Engine.xml b/doc/classes/Engine.xml index 12701d8688..fab8512e4a 100644 --- a/doc/classes/Engine.xml +++ b/doc/classes/Engine.xml @@ -34,7 +34,7 @@ </return> <description> Returns a Dictionary of Arrays of donor names. - {[code]platinum_sponsors[/code], [code]gold_sponsors[/code], [code]mini_sponsors[/code], [code]gold_donors[/code], [code]silver_donors[/code], [code]bronze_donors[/code]} + {[code]platinum_sponsors[/code], [code]gold_sponsors[/code], [code]silver_sponsors[/code], [code]bronze_sponsors[/code], [code]mini_sponsors[/code], [code]gold_donors[/code], [code]silver_donors[/code], [code]bronze_donors[/code]} </description> </method> <method name="get_frames_drawn"> @@ -117,12 +117,24 @@ [code]year[/code] - Holds the year the version was released in as an int [code]string[/code] - [code]major[/code] + [code]minor[/code] + [code]patch[/code] + [code]status[/code] + [code]build[/code] in a single String The [code]hex[/code] value is encoded as follows, from left to right: one byte for the major, one byte for the minor, one byte for the patch version. For example, "3.1.12" would be [code]0x03010C[/code]. [b]Note:[/b] It's still an int internally, and printing it will give you its decimal representation, which is not particularly meaningful. Use hexadecimal literals for easy version comparisons from code: - [codeblock] + [codeblocks] + [gdscript] if Engine.get_version_info().hex >= 0x030200: # Do things specific to version 3.2 or later else: # Do things specific to versions before 3.2 - [/codeblock] + [/gdscript] + [csharp] + if ((int)Engine.GetVersionInfo()["hex"] >= 0x030200) + { + // Do things specific to version 3.2 or later + } + else + { + // Do things specific to versions before 3.2 + } + [/csharp] + [/codeblocks] </description> </method> <method name="has_singleton" qualifiers="const"> |