Reply To: Chapter 11-12 Code issue

Home Forums Books Mastering Unity 2D Game Development Chapter 11-12 Code issue Reply To: Chapter 11-12 Code issue


OK, going through this now and it is very odd.
Just put a load of logging data in and all the Singletons are being destroyed when loading The Main scene.

But The messaging manager isn’t even crated yet which is just odd. (actually it can’t be created because the FadInOutManager destroy has been called, which sets the “applicationIsQuitting” property, which in turn stops new Singletons from being created because Unity is closing)

Also for some reason OnDestroy is being called even though the FadeInOutManager is using “DontDestroyOnLoad”, which means it should only be called when it is actually destroyed when Unity closes / quits.

Hmm, going to investigate further as this smells like a new Unity bug.

Simon (Darkside) Jackson