Skip to content

Extension

BelicusBr edited this page Sep 7, 2024 · 2 revisions

If you inherit any of this class, remember to use this to use the methods of these extensions.

Node Extension

Methods Description
void Print(params object[]) Output a message in the godot editor console
Node[] FindNodes(Type, bool) Get the nodes of a type recursively.
Node[] FindNodes(Type) Get the nodes from a type.
T[] FindNodes(bool) Get the nodes of a type recursively.
T[] FindNodes() Get the nodes from a type.
Node FindNodeByName(string, Type, bool) Get a node by name recursively.
Node FindNodeByName(string, bool) Get a node by name recursively.
Node FindNodeByName(string, Type) Get a node by name.
Node FindNodeByName(string) Get a node by name.
T FindNodeByName(string, bool) Get a node by name recursively.
T FindNodeByName(string) Get a node by name.

Camera2D Extension

Methods Description
Vector2 ScreenToWorldPoint(Vector2) Converts a point on the screen to a point in the 2D world.
Vector2 WorldToScreenPoint(Vector2) Converts a point in the 2D world to a point on the screen.

Rect2 Extension

Methods Description
float Top() Gets the top position of the rectangle.
float Bottom() Gets the bottom position of the rectangle.
float Left() Gets the position on the left of the rectangle.
float Right() Gets the position on the right of the rectangle.