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


I already know what is the problem. I found (singleton) MessagingManager game object at hierarchy of the <span style=”font-family: ‘Open Sans’, sans-serif; font-size: 12px; line-height: 24.2999992370605px;”>MainMenu scene. After I click New Game,  OnDestroy function will be called and applicationIsQuitting variable in Singleton class will set to true. Then, the </span>(singleton) MessagingManager game object will be destroyed. So, when switch to new scene, as applicationIsQuitting variable is still remain true, it will still keep returning null and that’s why new (singleton) MessagingManager game object will never create again.