I’m happy my info helped
As for the TCastleUserInterface.Component[I]
– it will iterate over components “owned”. Which may, or may not, be what you’re looking for. See https://forum.castle-engine.io/t/cge-inside-delphi-for-beginner/ thread for my recent explanation how “ownership” differs from “visual hierarchy” in CGE (similar to LCL / VCL / FMX actually).
But, long story short, yeah, you want to iterate over visual hierarchy which means just for Child in Ui ...
is what you need