Reply To: Ch 5 worry – MessagingManager not firing

Home Forums Books Mastering Unity 2D Game Development Ch 5 worry – MessagingManager not firing Reply To: Ch 5 worry – MessagingManager not firing



Hi Simon,

I went back to basics and had it all running a treat, then foolishly tweaked something somewhere and now find the MessagingManager class is being destroyed when I navigate from Home to the World.  It’s when I start in the World, then go to Home.  Class is still there.  Then, as soon as I go back to the World – gone!  I’ve put in a stack of Debug.logs and can verify it happens on the World scene load.

I’ve tried going over all the code, and checked that I haven’t misspelled any reserved functions (like DontDestroyOnLoad).  In spite of that, the singleton just doesn’t make it back to the World scene.  I’ll be darned if I can find out why it’s being killed off.  Just can’t find out why OnDestroy is being activated.

Hoping to receive any advice, especially if anybody is aware of how the DontDestroy can be overridden. Something is knocking it out somewhere!

Kind Regards,