Up to date

This page is up to date for Godot 4.2. If you still find outdated information, please open an issue.

@GlobalScope

Global scope constants and functions.

Description

A list of global scope enumerated constants and built-in functions. 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.

For the entries related to GDScript which can be accessed in any script see @GDScript.

Note

There are notable differences when using this API with C#. See C# API differences to GDScript for more information.

Tutorials

Properties

AudioServer

AudioServer

CameraServer

CameraServer

ClassDB

ClassDB

DisplayServer

DisplayServer

EditorInterface

EditorInterface

Engine

Engine

EngineDebugger

EngineDebugger

GDExtensionManager

GDExtensionManager

Geometry2D

Geometry2D

Geometry3D

Geometry3D

GodotSharp

GodotSharp

IP

IP

Input

Input

InputMap

InputMap

JavaClassWrapper

JavaClassWrapper

JavaScriptBridge

JavaScriptBridge

Marshalls

Marshalls

NavigationMeshGenerator

NavigationMeshGenerator

NavigationServer2D

NavigationServer2D

NavigationServer3D

NavigationServer3D

OS

OS

Performance

Performance

PhysicsServer2D

PhysicsServer2D

PhysicsServer2DManager

PhysicsServer2DManager

PhysicsServer3D

PhysicsServer3D

PhysicsServer3DManager

PhysicsServer3DManager

ProjectSettings

ProjectSettings

RenderingServer

RenderingServer

ResourceLoader

ResourceLoader

ResourceSaver

ResourceSaver

ResourceUID

ResourceUID

TextServerManager

TextServerManager

ThemeDB

ThemeDB

Time

Time

TranslationServer

TranslationServer

WorkerThreadPool

WorkerThreadPool

XRServer

XRServer

Methods

Variant

abs ( Variant x )

float

absf ( float x )

int

absi ( int x )

float

acos ( float x )

float

acosh ( float x )

float

angle_difference ( float from, float to )

float

asin ( float x )

float

asinh ( float x )

float

atan ( float x )

float

atan2 ( float y, float x )

float

atanh ( float x )

float

bezier_derivative ( float start, float control_1, float control_2, float end, float t )

float

bezier_interpolate ( float start, float control_1, float control_2, float end, float t )

Variant

bytes_to_var ( PackedByteArray bytes )

Variant

bytes_to_var_with_objects ( PackedByteArray bytes )

Variant

ceil ( Variant x )

float

ceilf ( float x )

int

ceili ( float x )

Variant

clamp ( Variant value, Variant min, Variant max )

float

clampf ( float value, float min, float max )

int

clampi ( int value, int min, int max )

float

cos ( float angle_rad )

float

cosh ( float x )

float

cubic_interpolate ( float from, float to, float pre, float post, float weight )

float

cubic_interpolate_angle ( float from, float to, float pre, float post, float weight )

float

cubic_interpolate_angle_in_time ( float from, float to, float pre, float post, float weight, float to_t, float pre_t, float post_t )

float

cubic_interpolate_in_time ( float from, float to, float pre, float