Awake() on main controller not executed

I’m having some trouble running some initialisation code in my main game controller. This is in the scene by default; however for some reason its Awake() function never seems to run.

If I put a Debug.LogError(“derp”) call right at the start of its Awake() for testing and execute the scene, nothing shows up in the debug log nor does execution pause. Similarly, nothing else in this Awake() function is run.

Awake() works on all other objects in the scene, and the FixedUpdate() function on the main controller also works. Have I somehow changed some obscure setting on the object that prevents it from running an Awake()?

I have worked around this for now by running my init code in a separate function which I’m calling from the controller’s FixedUpdate if init has not been performed yet.

Is this perhaps a base class from which you derived, and it’s the derived class you place in your scene?

Or maybe you have [ExecuteInEditMode] in the script, or it’s an Editor script.

The third possibility is, the script has DontDestroyOnLoad() set, so Awake() will be called once, but never again on scene changes.