How to iterate trough an object's field like Transform?

Hi! How do you create a class that can be iterated through one of it’s field? Like the Transform which can be done like foreach(Transform t in transform) ?

Guess I found the answer here: IEnumerable Interface (System.Collections) | Microsoft Learn

Still if you have something to add you’re welcome to do it. :slight_smile: