Hi All,
I need to find all Cameras that are descendants of a GameObject. I need to find them by type not by name.
There is a “Object.FindObjectsOfType” but since it is a static method, as far as I can understand it returns all Cameras in the scene not only Cameras descendants of a specific GameObject.
Eh, yes I know, that’s why the suggested solution does not work. I reported that only to show you the error and ask for a different solution then.
So, any other idea to get All Camera as chidren (or children of children and so on recursively) of a GameObject?
You need to target the correct type. You’re apparently targeting your own “Camera” class - you probably have that class’ namespace imported and not UnityEngine.