Look at this code guys:
I am not sure if I should place the code commented as “Unit data” in Start or in Awake as it is? I would put it in Start because it uses another component. And from what I know so far, in Awake you initialize yourself and in Start you reference others.
Thanks
Awake runs before Start, which is the only real difference (also Start can be a coroutine and Awake can’t). If you have code elsewhere that relies on something being initialized, then the code elsewhere should be in Start and the initialization should be in Awake, to make sure the order is defined. Normally two Awake functions are undefined in which order they run, though you can use script execution order to manually order them.
–Eric