Hello,
Sometimes I like to understand code clearly before I move on in the course. Right now I am stumped as I don’t understand the roles “Transform” and “transform” are playing under this code:
foreach(Transform child in transform)
{
GameObject enemy = Instantiate(enemyPrefab, new Vector3(0, 0, 0), Quaternion.identity) as GameObject;
enemy.transform.parent = transform;
}
I understand Transform is related to Position, Rotation, and Scale, but what exactly does “Transform child in transform” mean?
Thank You!.