This seems crazy but I need to confirm it.
Does Debug.Log guarantee any kind of order that the messages are displayed relative to when Debug.Log() is called?
I’m seeing some cases where it seems they’re being shown out of order.
For example:
// Instantiate object
myObj = (GameObject) MonoBehaviour.Instantiate(somePrefab);
myObj.Foo();
Then within SomePrefab,
void Awake() { Debug.Log("Awake called"); }
void Start() { Debug.Log("Start called"); }
void Foo() { Debug.Log("Foo called"); }
The output is:
Awake called
Foo called
Start called
I am surprised that Foo() is called even before SomePrefab’s fake constructor Start() thing has finished.
Is it a Start()/Awake()/Instantiate issue, or a Debug.Log issue?