using System.Collections.Generic; using System.Linq; using Godot; using Godot.Collections; namespace GodotComponentTest.entities; public class Flower : Entity { public override void _Ready() { Array children = new Array(); GetAllChildren(this, ref children); foreach (Node child in children) { if (child is ClickableComponent) { GD.Print("Found Clickable Component!"); } } } void GetAllChildren(Node childNode, ref Array childList) { var children = childNode.GetChildren(); foreach (Node child in children) { childList.Add(child); GetAllChildren(child, ref childList); } } }