Hi all. You use one entry point (like void Main) or multi (Awake,Start) for singleton manager scripts.
Every singleton manager scripts can have their own Awake functions to call and initialize functions but sometimes they depend on each other(we need to initialize first manager1 and then manager2 ,…).
I know we can use script execution orders but it is messy(causes very bug/nontestable)
It’s common to use Awake for any setup related to the game object/script itself, and Start for anything outside.
This means you can count on awake having been run before your Start method(s), provided they were all created at the same time, of course.
I’d recommend only ever using script execution order if you have a very good reason to do so. ![]()
plz see the link
Actually Unity doesn’t do all awake() and then all OnEnable(). For each script that it loads he does Awake() OnEnable and move on to the next script. So your problem is that Unity load Player first and then InputManager.
But there is a way to fix this built in Unity : The script Execution Order that you can find under Edit/ProjectSettings/Script Execution Order ( Unity - Manual: Script Execution Order settings ).
Hope that helped ya figure it out.
What the hell. I thought all awake are called and then all OnEnable and then All Start!!!