It looks like you're new here. If you want to get involved, click one of these buttons!
function Sprite.getCascadeChildrenCount(self) local count = 0 for i=1,self:getNumChildren() do count = count + self:getChildAt(i):getCascadeChildrenCount() + 1 end return count; end print(sprite:getCascadeChildrenCount())
Likes: totebo
Likes: totebo, antix
Comments
Likes: totebo
http://docs.giderosmobile.com/reference/gideros/Sprite/getNumChildren
Or modify print_r to keep a counter when getBaseClass returns Sprite
[Edit: mertocan was faster! ]
Likes: totebo, antix