Global scope constants and variables.
Global scope constants and variables. This is all that resides in the globals, constants regarding error codes, keycodes, property hints, etc.
Singletons are also documented here, since they can be accessed from anywhere.
The [AudioServer] singleton.
The [CameraServer] singleton.
The [ClassDB] singleton.
The [DisplayServer] singleton.
The [Engine] singleton.
The [EngineDebugger] singleton.
The [Geometry2D] singleton.
The [Geometry3D] singleton.
The [GodotSharp] singleton.
The [IP] singleton.
The [Input] singleton.
The [InputMap] singleton.
The [JSON] singleton.
The [JavaClassWrapper] singleton.
[b]Note:[/b] Only implemented on Android.
The [JavaScript] singleton.
[b]Note:[/b] Only implemented on HTML5.
The [Marshalls] singleton.
The [NavigationMeshGenerator] singleton.
The [NavigationServer2D] singleton.
The [NavigationServer2D] singleton.
The [OS] singleton.
The [Performance] singleton.
The [PhysicsServer2D] singleton.
The [PhysicsServer3D] singleton.
The [ProjectSettings] singleton.
The [RenderingServer] singleton.
The [ResourceLoader] singleton.
The [ResourceSaver] singleton.
The [TranslationServer] singleton.
The [VisualScriptEditor] singleton.
The [XRServer] singleton.
Left margin, usually used for [Control] or [StyleBox]-derived classes.
Top margin, usually used for [Control] or [StyleBox]-derived classes.
Right margin, usually used for [Control] or [StyleBox]-derived classes.
Bottom margin, usually used for [Control] or [StyleBox]-derived classes.
Top-left corner.
Top-right corner.
Bottom-right corner.
Bottom-left corner.
General vertical alignment, usually used for [Separator], [ScrollBar], [Slider], etc.
General horizontal alignment, usually used for [Separator], [ScrollBar], [Slider], etc.
Horizontal left alignment, usually for text-derived classes.
Horizontal center alignment, usually for text-derived classes.
Horizontal right alignment, usually for text-derived classes.
Vertical top alignment, usually for text-derived classes.
Vertical center alignment, usually for text-derived classes.
Vertical bottom alignment, usually for text-derived classes.
Keycodes with this bit applied are non-printable.
Escape key.
Tab key.
Shift + Tab key.
Backspace key.
Return key (on the main keyboard).
Enter key on the numeric keypad.
Insert key.
Delete key.
Pause key.
Print Screen key.
System Request key.
Clear key.
Home key.
End key.
Left arrow key.
Up arrow key.
Right arrow key.
Down arrow key.
Page Up key.
Page Down key.
Shift key.
Control key.
Meta key.
Alt key.
Caps Lock key.
Num Lock key.
Scroll Lock key.
F1 key.
F2 key.
F3 key.
F4 key.
F5 key.
F6 key.
F7 key.
F8 key.
F9 key.
F10 key.
F11 key.
F12 key.
F13 key.
F14 key.
F15 key.
F16 key.
Multiply (*) key on the numeric keypad.
Divide (/) key on the numeric keypad.
Subtract (-) key on the numeric keypad.
Period (.) key on the numeric keypad.
Add (+) key on the numeric keypad.
Number 0 on the numeric keypad.
Number 1 on the numeric keypad.
Number 2 on the numeric keypad.
Number 3 on the numeric keypad.
Number 4 on the numeric keypad.
Number 5 on the numeric keypad.
Number 6 on the numeric keypad.
Number 7 on the numeric keypad.
Number 8 on the numeric keypad.
Number 9 on the numeric keypad.
Left Super key (Windows key).
Right Super key (Windows key).
Context menu key.
Left Hyper key.
Right Hyper key.
Help key.
Left Direction key.
Right Direction key.
Media back key. Not to be confused with the Back button on an Android device.
Media forward key.
Media stop key.
Media refresh key.
Volume down key.
Mute volume key.
Volume up key.
Bass Boost key.
Bass up key.
Bass down key.
Treble up key.
Treble down key.
Media play key.
Media stop key.
Previous song key.
Next song key.
Media record key.
Home page key.
Favorites key.
Search key.
Standby key.
Open URL / Launch Browser key.
Launch Mail key.
Launch Media key.
Launch Shortcut 0 key.
Launch Shortcut 1 key.
Launch Shortcut 2 key.
Launch Shortcut 3 key.
Launch Shortcut 4 key.
Launch Shortcut 5 key.
Launch Shortcut 6 key.
Launch Shortcut 7 key.
Launch Shortcut 8 key.
Launch Shortcut 9 key.
Launch Shortcut A key.
Launch Shortcut B key.
Launch Shortcut C key.
Launch Shortcut D key.
Launch Shortcut E key.
Launch Shortcut F key.
Unknown key.
Space key.
! key.
" key.
# key.
$ key.
% key.
& key.
' key.
( key.
) key.
* key.
+ key.
, key.
- key.
. key.
/ key.
Number 0.
Number 1.
Number 2.
Number 3.
Number 4.
Number 5.
Number 6.
Number 7.
Number 8.
Number 9.
: key.
; key.
< key.
= key.
> key.
? key.
@ key.
A key.
B key.
C key.
D key.
E key.
F key.
G key.
H key.
I key.
J key.
K key.
L key.
M key.
N key.
O key.
P key.
Q key.
R key.
S key.
T key.
U key.
V key.
W key.
X key.
Y key.
Z key.
[ key.
\ key.
] key.
^ key.
_ key.
` key.
{ key.
| key.
} key.
~ key.
Non-breakable space key.
¡ key.
¢ key.
£ key.
¤ key.
¥ key.
¦ key.
§ key.
¨ key.
© key.
ª key.
« key.
¬ key.
Soft hyphen key.
® key.
¯ key.
° key.
± key.
² key.
³ key.
´ key.
µ key.
¶ key.
· key.
¸ key.
¹ key.
º key.
» key.
¼ key.
½ key.
¾ key.
¿ key.
À key.
Á key.
 key.
à key.
Ä key.
Å key.
Æ key.
Ç key.
È key.
É key.
Ê key.
Ë key.
Ì key.
Í key.
Î key.
Ï key.
Ð key.
Ñ key.
Ò key.
Ó key.
Ô key.
Õ key.
Ö key.
× key.
Ø key.
Ù key.
Ú key.
Û key.
Ü key.
Ý key.
Þ key.
ß key.
÷ key.
ÿ key.
Key Code mask.
Modifier key mask.
Shift key mask.
Alt key mask.
Meta key mask.
Ctrl key mask.
Command key mask. On macOS, this is equivalent to [constant KEY_MASK_META]. On other platforms, this is equivalent to [constant KEY_MASK_CTRL]. This mask should be preferred to [constant KEY_MASK_META] or [constant KEY_MASK_CTRL] for system shortcuts as it handles all platforms correctly.
Keypad key mask.
Group Switch key mask.
Left mouse button.
Right mouse button.
Middle mouse button.
Extra mouse button 1 (only present on some mice).
Extra mouse button 2 (only present on some mice).
Mouse wheel up.
Mouse wheel down.
Mouse wheel left button (only present on some mice).
Mouse wheel right button (only present on some mice).
Left mouse button mask.
Right mouse button mask.
Middle mouse button mask.
Extra mouse button 1 mask.
Extra mouse button 2 mask.
An invalid game controller button.
Game controller SDL button A.
Game controller SDL button B.
Game controller SDL button X.
Game controller SDL button Y.
Game controller SDL back button.
Game controller SDL guide button.
Game controller SDL start button.
Game controller SDL left stick button.
Game controller SDL right stick button.
Game controller SDL left shoulder button.
Game controller SDL right shoulder button.
Game controller SDL D-pad up button.
Game controller SDL D-pad down button.
Game controller SDL D-pad left button.
Game controller SDL D-pad right button.
The number of SDL game controller buttons.
Sony DualShock controller X button maps to SDL button A.
Sony DualShock controller cross button maps to SDL button A.
Sony DualShock controller circle button maps to SDL button B.
Sony DualShock controller square button maps to SDL button X.
Sony DualShock controller triangle button maps to SDL button Y.
Sony DualShock controller select button maps to SDL back button.
Sony DualShock controller start button maps to SDL start button.
Sony DualShock controller PS button maps to SDL guide button.
Sony DualShock controller L1 button maps to SDL left shoulder button.
Sony DualShock controller R1 button maps to SDL right shoulder button.
Sony DualShock controller L3 button maps to SDL left stick button.
Sony DualShock controller R3 button maps to SDL right stick button.
Xbox game controller A button maps to SDL button A.
Xbox game controller B button maps to SDL button B.
Xbox game controller X button maps to SDL button X.
Xbox game controller Y button maps to SDL button Y.
Xbox game controller back button maps to SDL back button.
Xbox game controller start button maps to SDL start button.
Xbox game controller home button maps to SDL guide button.
Xbox game controller left stick button maps to SDL left stick button.
Xbox game controller right stick button maps to SDL right stick button.
Xbox game controller left bumper button maps to SDL left shoulder button.
Xbox game controller right bumper button maps to SDL right shoulder button.
The maximum number of game controller buttons.
An invalid game controller axis.
Game controller left joystick x-axis.
Game controller left joystick y-axis.
Game controller right joystick x-axis.
Game controller right joystick y-axis.
Game controller left trigger axis.
Game controller right trigger axis.
The number of SDL game controller axes.
Game controller joystick 0 x-axis.
Game controller joystick 0 y-axis.
Game controller joystick 1 x-axis.
Game controller joystick 1 y-axis.
Game controller joystick 2 x-axis.
Game controller joystick 2 y-axis.
Game controller joystick 3 x-axis.
Game controller joystick 3 y-axis.
Game controller joystick 4 x-axis.
Game controller joystick 4 y-axis.
The maximum number of game controller axes.
MIDI note OFF message.
MIDI note ON message.
MIDI aftertouch message.
MIDI control change message.
MIDI program change message.
MIDI channel pressure message.
MIDI pitch bend message.
Methods that return [enum Error] return [constant OK] when no error occurred. Note that many functions don't return an error code but will print error messages to standard output.
Since [constant OK] has value 0, and all other failure codes are positive integers, it can also be used in boolean checks, e.g.:
[codeblock]
var err = method_that_returns_error()
if err != OK:
print("Failure!")
# Or, equivalent:
if err:
print("Still failing!")
[/codeblock]
Generic error.
Unavailable error.
Unconfigured error.
Unauthorized error.
Parameter range error.
Out of memory (OOM) error.
File: Not found error.
File: Bad drive error.
File: Bad path error.
File: No permission error.
File: Already in use error.
File: Can't open error.
File: Can't write error.
File: Can't read error.
File: Unrecognized error.
File: Corrupt error.
File: Missing dependencies error.
File: End of file (EOF) error.
Can't open error.
Can't create error.
Query failed error.
Already in use error.
Locked error.
Timeout error.
Can't connect error.
Can't resolve error.
Connection error.
Can't acquire resource error.
Can't fork process error.
Invalid data error.
Invalid parameter error.
Already exists error.
Does not exist error.
Database: Read error.
Database: Write error.
Compilation failed error.
Method not found error.
Linking failed error.
Script failed error.
Cycling link (import cycle) error.
Invalid declaration error.
Duplicate symbol error.
Parse error.
Busy error.
Skip error.
Help error.
Bug error.
Printer on fire error. (This is an easter egg, no engine methods return this error code.)
No hint for the edited property.
Hints that an integer or float property should be within a range specified via the hint string [code]"min,max"[/code] or [code]"min,max,step"[/code]. The hint string can optionally include [code]"or_greater"[/code] and/or [code]"or_lesser"[/code] to allow manual input going respectively above the max or below the min values. Example: [code]"-360,360,1,or_greater,or_lesser"[/code].
Hints that an integer or float property should be within an exponential range specified via the hint string [code]"min,max"[/code] or [code]"min,max,step"[/code]. The hint string can optionally include [code]"or_greater"[/code] and/or [code]"or_lesser"[/code] to allow manual input going respectively above the max or below the min values. Example: [code]"0.01,100,0.01,or_greater"[/code].
Hints that an integer, float or string property is an enumerated value to pick in a list specified via a hint string such as [code]"Hello,Something,Else"[/code].
Hints that a float property should be edited via an exponential easing function. The hint string can include [code]"attenuation"[/code] to flip the curve horizontally and/or [code]"inout"[/code] to also include in/out easing.
Deprecated hint, unused.
Deprecated hint, unused.
Hints that an integer property is a bitmask with named bit flags. For example, to allow toggling bits 0, 1, 2 and 4, the hint could be something like [code]"Bit0,Bit1,Bit2,,Bit4"[/code].
Hints that an integer property is a bitmask using the optionally named 2D render layers.
Hints that an integer property is a bitmask using the optionally named 2D physics layers.
Hints that an integer property is a bitmask using the optionally named 3D render layers.
Hints that an integer property is a bitmask using the optionally named 3D physics layers.
Hints that a string property is a path to a file. Editing it will show a file dialog for picking the path. The hint string can be a set of filters with wildcards like [code]"*.png,*.jpg"[/code].
Hints that a string property is a path to a directory. Editing it will show a file dialog for picking the path.
Hints that a string property is an absolute path to a file outside the project folder. Editing it will show a file dialog for picking the path. The hint string can be a set of filters with wildcards like [code]"*.png,*.jpg"[/code].
Hints that a string property is an absolute path to a directory outside the project folder. Editing it will show a file dialog for picking the path.
Hints that a property is an instance of a [Resource]-derived type, optionally specified via the hint string (e.g. [code]"Texture2D"[/code]). Editing it will show a popup menu of valid resource types to instantiate.
Hints that a string property is text with line breaks. Editing it will show a text input field where line breaks can be typed.
Hints that a string property should have a placeholder text visible on its input field, whenever the property is empty. The hint string is the placeholder text to use.
Hints that a color property should be edited without changing its alpha component, i.e. only R, G and B channels are edited.
Hints that an image is compressed using lossy compression.
Hints that an image is compressed using lossless compression.
The property is serialized and saved in the scene file (default).
The property is shown in the editor inspector (default).
Deprecated usage flag, unused.
Deprecated usage flag, unused.
The property can be checked in the editor inspector.
The property is checked in the editor inspector.
The property is a translatable string.
Used to group properties together in the editor.
Used to categorize properties together in the editor.
Used to group properties together in the editor in a subgroup (under a group).
The property does not save its state in [PackedScene].
Editing the property prompts the user for restarting the editor.
The property is a script variable which should be serialized and saved in the scene file.
Default usage (storage, editor and network).
Default usage for translatable strings (storage, editor, network and internationalized).
Default usage but without showing the property in the editor (storage, network).
Flag for a normal method.
Flag for an editor method.
Deprecated method flag, unused.
Flag for a constant method.
Deprecated method flag, unused.
Flag for a virtual method.
Deprecated method flag, unused.
Default method flags.
Variable is [code]null[/code].
Variable is of type [bool].
Variable is of type [int].
Variable is of type [float] (real).
Variable is of type [String].
Variable is of type [Vector2].
Variable is of type [Vector2i].
Variable is of type [Rect2].
Variable is of type [Rect2i].
Variable is of type [Vector3].
Variable is of type [Vector3i].
Variable is of type [Transform2D].
Variable is of type [Plane].
Variable is of type [Quat].
Variable is of type [AABB].
Variable is of type [Basis].
Variable is of type [Transform].
Variable is of type [Color].
Variable is of type [StringName].
Variable is of type [NodePath].
Variable is of type [RID].
Variable is of type [Object].
Variable is of type [Callable].
Variable is of type [Signal].
Variable is of type [Dictionary].
Variable is of type [Array].
Variable is of type [PackedByteArray].
Variable is of type [PackedInt32Array].
Variable is of type [PackedInt64Array].
Variable is of type [PackedFloat32Array].
Variable is of type [PackedFloat64Array].
Variable is of type [PackedStringArray].
Variable is of type [PackedVector2Array].
Variable is of type [PackedVector3Array].
Variable is of type [PackedColorArray].
Represents the size of the [enum Variant.Type] enum.
Equality operator ([code]==[/code]).
Inequality operator ([code]!=[/code]).
Less than operator ([code]<[/code]).
Less than or equal operator ([code]<=[/code]).
Greater than operator ([code]>[/code]).
Greater than or equal operator ([code]>=[/code]).
Addition operator ([code]+[/code]).
Subtraction operator ([code]-[/code]).
Multiplication operator ([code]*[/code]).
Division operator ([code]/[/code]).
Unary negation operator ([code]-[/code]).
Unary plus operator ([code]+[/code]).
Remainder/modulo operator ([code]%[/code]).
String concatenation operator ([code]+[/code]).
Left shift operator ([code]<<[/code]).
Right shift operator ([code]>>[/code]).
Bitwise AND operator ([code]&[/code]).
Bitwise OR operator ([code]|[/code]).
Bitwise XOR operator ([code]^[/code]).
Bitwise NOT operator ([code]~[/code]).
Logical AND operator ([code]and[/code] or [code]&&[/code]).
Logical OR operator ([code]or[/code] or [code]||[/code]).
Logical XOR operator (not implemented in GDScript).
Logical NOT operator ([code]not[/code] or [code]![/code]).
Logical IN operator ([code]in[/code]).
Represents the size of the [enum Variant.Operator] enum.