Module global
Expand description
Godot global enums, constants and utility functions.
See also Godot docs for @GlobalScope
.
§Builtin-related enums
The library ships several additional enums in places where GDScript would use magic numbers. These are co-located with
builtin types, in the godot::builtin
module. The enums are:
- Color:
ColorChannelOrder
- Projection:
ProjectionEye
,ProjectionPlane
- Rectangle:
Side
,Corner
(godot-generated) - Rotation:
EulerOrder
(godot-generated) - Variant:
VariantType
,VariantOperator
- Vector:
Vector2Axis
,Vector3Axis
,Vector4Axis
Macros§
- godot_
error - Pushes an error message to Godot’s built-in debugger and to the OS terminal.
- godot_
print - Prints to the Godot console.
- godot_
print_ rich - Prints to the Godot console. Supports BBCode, color and URL tags.
- godot_
script_ error - Logs a script error to Godot’s built-in debugger and to the OS terminal.
- godot_
warn - Pushes a warning message to Godot’s built-in debugger and to the OS terminal.
Structs§
- Error
- Horizontal
Alignment - Inline
Alignment - JoyAxis
- JoyButton
- Key
- KeyLocation
- KeyModifier
Mask - Method
Flags - Midi
Message - Godot enum name:
MIDIMessage
. - Mouse
Button - Mouse
Button Mask - Property
Hint - Property
Usage Flags - Vertical
Alignment
Enums§
- Clock
Direction - This enum is exhaustive; you should not expect future Godot versions to add new enumerators.
- Orientation
- This enum is exhaustive; you should not expect future Godot versions to add new enumerators.
Functions§
- abs
- absf
- absi
- acos
- acosh
- angle_
difference - asin
- asinh
- atan
- atan2
- atanh
- bezier_
derivative - bezier_
interpolate - bytes_
to_ var - bytes_
to_ var_ with_ objects - ceil
- ceilf
- ceili
- clamp
- clampf
- clampi
- cos
- cosh
- cubic_
interpolate - cubic_
interpolate_ angle - cubic_
interpolate_ angle_ in_ time - cubic_
interpolate_ in_ time - db_
to_ linear - deg_
to_ rad - ease
- error_
string - exp
- floor
- floorf
- floori
- fmod
- fposmod
- hash
- instance_
from_ id Deprecated - inverse_
lerp - is_
equal_ approx - is_
finite - is_inf
- is_
instance_ id_ valid Deprecated - is_
instance_ valid Deprecated - is_nan
- is_same
- is_
zero_ approx - lerp
- lerp_
angle - lerpf
- linear_
to_ db - log
- max
- maxf
- maxi
- min
- minf
- mini
- move_
toward - nearest_
po2 - pingpong
- posmod
- pow
- print_
rich - print_
verbose - printerr
- printraw
- prints
- printt
- push_
error - push_
warning - rad_
to_ deg - rand_
from_ seed - randf
- randf_
range - randfn
- randi
- randi_
range - randomize
- remap
- rid_
allocate_ id - rid_
from_ int64 - rotate_
toward - round
- roundf
- roundi
- seed
- sign
- signf
- signi
- sin
- sinh
- smoothstep
- snapped
- snappedf
- snappedi
- sqrt
- step_
decimals - str
- str_
to_ var - tan
- tanh
- type_
convert - type_
string - typeof_
- var_
to_ bytes - var_
to_ bytes_ with_ objects - var_
to_ str - weakref
- wrap
- wrapf
- wrapi