Module global

Expand description

Godot global enums, constants and utility functions.

See also Godot docs for @GlobalScope.

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:

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
HorizontalAlignment
InlineAlignment
JoyAxis
JoyButton
Key
KeyLocation
KeyModifierMask
MethodFlags
MidiMessage
Godot enum name: MIDIMessage.
MouseButton
MouseButtonMask
PropertyHint
PropertyUsageFlags
VerticalAlignment

Enums§

ClockDirection
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_idDeprecated
inverse_lerp
is_equal_approx
is_finite
is_inf
is_instance_id_validDeprecated
is_instance_validDeprecated
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
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