Package: godot.core. Callable0<R> through Callable16<R, ...> encode a return type followed by parameter types. MethodCallableN targets a Godot method; LambdaCallableN wraps a JVM lambda. VariantCallable is the native/dynamic representation.
Method callables
The target method must be available to Godot. Kotlin helpers take an unbound method reference; Java and Scala factories take a typed method name. Here Player.onHealthChanged is a registered one-integer, no-result method.
Type arguments are owner, return, then parameters. The constructor preserves the supplied string; pass on_health_changed, not onHealthChanged. Declare a name once for a registered script method. Every method on a generated Godot base class already has a generated ...Name field, such as Node.queueFreeName; use it directly. Built-in no-result method fields use Kotlin Unit; let factory inference preserve that type.
MethodCallableN.createUnsafe(owner, name) in Java/Scala accepts an untyped string and converts it to snake_case; its generic signature is a caller assertion, not proof that the target method matches.
Lambda callables
Value-returning Java/Scala factories take the return class, parameter classes, then the lambda. Action overloads omit the return class and use Void as the callable return type. Kotlin captures types through reified helpers.
Kotlin also converts an existing lambda with asCallable() from godot.core. Java/Scala use LambdaCallableN.create. The argument and return classes must have Godot Variant converters.
Explicit converters for typed containers
A class only names the outer type, and so does a reified type parameter: a VariantArray<Int> parameter created from VariantArray.class or from lambdaCallable1<Unit, VariantArray<Int>> is treated as an untyped array and its elements arrive as Long. Every lambdaCallableN helper and LambdaCallableN.create factory therefore also accepts VariantConverter arguments in place of the classes: the return converter first, then one converter per parameter, then the lambda. A converter carries the JVM type it produces (VariantCaster.INT is a VariantConverter<Int>), so the callable's type arguments are inferred from the converters and need not be spelled out. Use VariantCaster.TYPED_ARRAY(elementConverter) and VariantCaster.TYPED_DICTIONARY(keyConverter, valueConverter) from godot.core to describe typed containers, nesting them as needed; VariantParser and VariantCaster provide the converters for the other types (VariantCaster.INT, VariantParser.STRING, VariantParser.OBJECT...). From Java and Scala, the VariantCaster singletons are reached through INSTANCE.
Registered properties, functions, and signals get these container converters generated from their declared generic arguments, so this is only needed for values built by hand. VariantArray and Dictionary have matching constructors taking converters, for example VariantArray(VariantCaster.TYPED_ARRAY(VariantCaster.INT)) is a VariantArray<VariantArray<Int>>; the Godot container is typed with the converter's builtin type, without narrowing object classes.
Calling and binding
Method
Contract
call(args...) / invoke(args...)
Calls with typed arguments and returns R
callDeferred(args...)
Schedules a call during Godot idle processing; no result is returned
bind(trailingArgs...)
Returns a callable with fewer parameters; bound arguments are appended after future call arguments
unbind(count)
Returns a VariantCallable that ignores trailing arguments supplied by the caller