The irony of the Singleton Component approach is that we are using one of Unity3D’s
Find() methods to determine whether or not one of these Singleton Components already
exists in the Scene before we attempt to assign the __Instance reference variable.
Fortunately, this will only happen when the Singleton Component is first accessed, but it’s
possible that the initialization of the Singleton would not necessarily occur during Scene
initialization and can therefore cost us a performance spike at a bad moment during
gameplay, when this object is first instantiated and Find() gets called. The workaround
for this is to have some god class confirm that the important Singletons are instantiated
during Scene initialization by simply calling Instance on each one.
The downside to this approach is that if we later decide that we want more than one of
these manager classes executing at once, or we wish to separate its behavior to be more
modular, then there would be a lot of code that needs to change.
There are further alternatives that we can explore, such as making use of Unity’s built-in
bridge between script code and the Inspector interface.