We have creation code:
Debug.Log("1");
GameObject obj = GameObject.Instantiate(prefab, new Vector3(0, level, 0), Quaternion.identity) as GameObject;
Debug.Log("2");
obj.name = level.ToString();
Debug.Log("3");
and object code:
void Start ()
{
Debug.Log("4");
}
void Awake()
{
Debug.Log("5");
}
Log is: 1,5,2,3,4.
Debug.Log("1");
GameObject obj = GameObject.Instantiate(prefab, new Vector3(0, level, 0), Quaternion.identity) as GameObject;
Debug.Log("2");
obj.name = level.ToString();
Debug.Log("3");
and object code:
void Start ()
{
Debug.Log("4");
}
void Awake()
{
Debug.Log("5");
}
Log is: 1,5,2,3,4.
Комментариев нет:
Отправить комментарий