GameObject[] gos = Resources.FindObjectsOfTypeAll<GameObject>();
public void DescribeGameObject(GameObject go, int count)
{
go.name = "Found:" + count;
string childrenNames = "";
for (int i = 0; i < go.transform.childCount; i++)
{
childrenNames = childrenNames + "," + go.transform.GetChild(i).gameObject.name;
}
string componentNames = "";
foreach (Component c in go.GetComponents<MonoBehaviour>())
{
componentNames = componentNames + "," + c.name+"-"+c.GetType().Name;
}
Utils.DebugLog("Named Him:"+go.name+", active=" + go.activeInHierarchy + " parent = "+((go.transform.parent == null) ?"null":go.transform.parent.name)+" child count = " + go.transform.childCount + " children =" + childrenNames + " components=" + componentNames);
}