unity how to check if gameobject has child code example
Example: unity check if child exists
Transform[] ts = GetComponentsInChildren<Transform>();
foreach(Transform t in ts)
{
if(t != null)
{
//do something
}
}