hey! i want to fill in some Target Transform Dynamically
public Transform[] m_Targets; // All the targets the camera needs to encompass.
so it should look on Awake for all Spawn Points available and fill it in the array. I did it this way:
private void Awake ()
{
m_Targets[1] = GameObject.Find("Spawn1");
m_Targets[2] = GameObject.Find("Spawn2");
m_Targets[3] = GameObject.Find("Spawn3");
m_Targets[4] = GameObject.Find("Spawn4");
}
so i expected that on startup all Spawn1-4 GameObjects gets placed in the Transform Targets field but nothing happens on startup and the fileds stay empty. could you tell me why?