-
Notifications
You must be signed in to change notification settings - Fork 13
Extensions
Valk edited this page Sep 19, 2024
·
10 revisions
The .PrintFormatted() extension method outputs all public properties and fields of any object, including nodes, providing a detailed snapshot of the object's state.
// Prints results with GD.Print()
node.PrintFormatted();
array.PrintFormatted();
// .ToFormattedString() may be desired if you don't want to use GD.Print()
Game.Log(node.ToFormattedString());
Game.Log(array.ToFormattedString());Recursively searches through the children of a node to find the first instance of a specified type.
entity.GetNode<Sprite2D>();Recursively gathers all nodes of a specified type from a given node.
List<Control> nothingButUINodes = mostlyUINodes.GetChildren<Control>();Frees all child nodes of a given parent node.
node.QueueFreeChildren();Found information that needs to be updated in the wiki? Or have a suggestion for a new feature? Or maybe you found a bug? Want to contribute but have no idea where to start? Send me a message over Discord, my username is valky5.