Up to date
This page is up to date for Godot
If you still find outdated information, please open an issue.
How to read the Godot API¶
On this page, you'll learn how to read the class reference for the Godot API.
The API, or Application Programming Interface, is an index of what Godot offers users. It provides a brief summary of which classes exist, how they are related to each other, what features they have, and how to use them.
At the top of each file, you will see the name of the class.
The "Inherits" section lists each class the current one inherits.
The "Inherited By" section lists each class which directly inherits the
current class. Here
Node2D both inherit
Next a brief description of the class. This text appears in Godot Editor popups for creating Nodes, Resources, and other types.
Next a more detailed description the class, its features, and its use case(s).
Things you may find here:
Specifics of how the class works.
Code samples of common use cases.
Usage details which are shared between each of the class's methods.
Warnings about required dependencies or configuration.
Links to other related parts of the Godot API.
The page then provides links to parts of the manual which mention or make use of the current class.
The Properties table lists the variables which belong to each instance of the class, also known as the "properties."
The left column contains the data type of the property. The text is also a link to that data type's Godot API page.
The center column contains the name of the property. The text is also a link to that property's full description on the page. Use this name to get the property's data or set a new value to it.
The right column contains the default value of the property. To initialize it with a different value, you must set a different value via script or the Inspector.
The Methods table lists the functions which belong to each instance of the class, also known as the "methods."
The left column contains the data type of the method's return value.
The right column contains the name, parameters, and qualifiers of the method. The name is the text before the opening parenthesis. It is also a link to the method's full description on the page. Use this name to call the method.
For each parameter, the page details its data type, name, and default value, if any.
Possible qualifiers include...
const: the method does not change any data in the class instance.
virtual: the method does nothing but wait for a script to override it.
vararg: the method can accept an arbitrary number of arguments.
The Signals list details the names and parameters of events which "signal" a change in game state to other class instances.
Like the Methods table, any parameters will include their data type and name.
Each signal also has a detailed explanation of when the signal is emitted.
The Enumerations list details the enumerable data types associated with the current class.
For each enumeration, the page states its name and then lists its possible values.
For each enumeration value, the page states its name, its integer value, and an explanation of its use case(s) and/or affects.
The Constants list details named integer constants in the current class.