I’ve done a lot of searching already on this topic, but it is something that I am greatly confused about.
I have a number of scripts that need to refer to each other in my codebase. Ideally, I’d like some way of ordering the execution of scripts, but this is impossible in Unity.
According to many posts on this forum, Awake() is called in all scripts and then once that is done, Start() is called in each of the scripts. However, this just does not seem to be the case, at least not when running on an iOS device. I have a class called SceneManager which I use to manage many of the other scripts in my codebase. I am therefore initializing only local variables in it’s Awake() method, and then working on other scripts during it’s Start() method. However, when debugging to console on an iOS device, Start() is called after Awake() for this script, but before Awake() is called on other scripts I have in my scene.
What is the definitive initialization order with scripts, and how is one meant to go about initializing scripts that require other objects / classes to be initialized first?