Engine API and naming
Packages
| Package |
Contents |
godot.api |
Engine classes and singletons: Node, Resource, Input, Engine |
godot.core |
Variant-compatible types, enums, signals, and callables |
godot.annotation |
Registration and Inspector annotations |
godot.global |
GD global functions |
godot.extension |
Binding convenience APIs |
godot.coroutines |
Optional Kotlin coroutine APIs |
Engine class behavior is documented in the Godot class reference; select the engine version used by your project. This page specifies the JVM access forms and naming differences.
Methods and properties
Regular generated methods use camelCase: add_child becomes addChild. Generated properties expose JVM getters/setters. Engine virtual callbacks preserve names such as _ready and _physics_process.
Value-type getters return copies; see types and conversions.
Singletons and global functions
Engine singletons are accessed through their generated class. Global helpers are on godot.global.GD.
Enums and constants
Enum values are scoped under the enum type. Node.PROCESS_MODE_INHERIT becomes Node.ProcessMode.INHERIT. Generated enums expose their numeric Godot value.
Renamed symbols
| Godot symbol |
JVM symbol |
Array |
VariantArray |
| Packed-array conversion to another packed type |
toPackedXArray / toPackedByteArray |
Error.ERR_PARAMETER_RANGE_ERROR |
Error.PARAMETER_RANGE |
MethodFlags.METHOD_FLAG_NORMAL |
MethodFlags.NORMAL |
Node.ProcessThreadMessages.FLAG_PROCESS_THREAD_MESSAGES_PHYSICS |
Node.ProcessThreadMessages.FLAG_PHYSICS |
Redundant enum-name prefixes are removed from generated enum entries. Engine bitfield wrappers and user BitField<E> are described under enums and bitfields.
Registered member names
User properties, functions, and signals use snake_case on the Godot side: moveSpeed becomes move_speed. This is separate from generated API method access in JVM code.
String-based Godot calls and MethodStringNameN require the registered name. SignalN.create and StringNames.toGodotName perform conversion; MethodStringNameN constructors preserve their input. See callables.
Additional functions
Binding-specific helpers are listed under global functions, types, objects, and signals.
Finding nodes
getNode(NodePath) returns Node?; a missing path returns null and Godot reports an error. Cast to the expected subclass. Kotlin also provides getNodeAs<T> in godot.extension; it returns null for a missing node, but a wrong class cast still fails.
Loading and instantiating scenes
GD.load<T> returns a nullable resource. PackedScene.instantiate() returns the scene root as a Node; cast to the scene's actual root type and add it to the tree. These snippets run inside a node method and expect a Node2D root.