Skip to main content

Object

Inherits: Base class for all other classes

Description

Base class for all other classes in the engine. An advanced Variant type. All classes in the engine inherit from Object. Each class may define new properties, methods or signals, which are available to all inheriting classes.

Key Methods

free

Deletes the object from memory. Pre-existing references to the object become invalid.

call

Calls the method on the object and returns the result. Supports a variable number of arguments.
StringName
The name of the method to call

connect

Connects a signal by name to a callable. Returns ERR_INVALID_PARAMETER if the signal is already connected.
StringName
The signal name to connect
Callable
The callable to connect to the signal

get

Returns the Variant value of the given property. Returns null if the property does not exist.

set

Assigns value to the given property. If the property does not exist or types don’t match, nothing happens.

Signals

property_list_changed()

Emitted when property list changes.

Example Usage