-
major - Major version number as an int;
-
minor - Minor version number as an int;
-
patch - Patch version number as an int;
-
hex - Full version encoded as a hexadecimal int with one byte (2 hex digits) per number (see example below);
-
status - Status (such as "beta", "rc1", "rc2", "stable", etc.) as a String;
-
build - Build name (e.g. "custom_build") as a String;
-
hash - Full Git commit hash as a String;
-
timestamp - Holds the Git commit date UNIX timestamp in seconds as an int, or
0 if unavailable;
-
string -
major,
minor,
patch,
status, and
build in a single String.
The
hex 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
0x03010C.
Note: The
hex value is still an
int internally, and printing it will give you its decimal representation, which is not particularly meaningful. Use hexadecimal literals for quick version comparisons from code:
if Engine.get_version_info().hex >= 0x040100:
pass # Do things specific to version 4.1 or later.
else:
pass # Do things specific to versions before 4.1.
if ((int)Engine.GetVersionInfo()["hex"] >= 0x040100)
{
// Do things specific to version 4.1 or later.
}
else
{
// Do things specific to versions before 4.1.
}