During the course 2D topDownPixelCombat in one moment (I dont know exactly when) I encountered an issue with null reference exeptions - my default weapon stopped to spawn and entire weapon system stopped working. Console was throwing some strange null reference exceptions (I don’t have them screenshotted, sorry). Before (some random step not connected at all with weapon system) it all worked well.
What turned out was that one of the singletons (Active Weapon to be precise) was not initialized before other scripts wanted to reference it, and because of that a static Instance of ActiveWeapon was not yet created and caused NRE.
The solution for me was to go to Script Execution Order settings and plop the ActiveWeapon before Default Time.
Is this normal behavior for Singletons in Unity? Id guess it is, as they are all Instantiated in Awake (at least in this implementation?), and there is no way of telling which Awake is running first (other than script execution order ofc).
I think it might be worth mentioning this problem in this course, because it uses Singletons quite extensively.