How can I get the last frame before a new level was loaded ?

Hello ,

I need to detach some persitsant objects from my non-persitant MainCamera right before a new level was loaded.

OnLevelWasloaded is fired, as the name suggests, when the the new scene is loaded.

I am loading Asynchronous and I see no possibility to detach my objects just before my MainCam gets destryoed.

Async.isDone happens too late , and Async.progress always returns 0 until its done... which seems to be a bug according to other posts.

Is there any other way to make sure my objects are getting detached , right before the new scene starts ? (Something like : if (async.progress > 0.95f) Detach();

Thanks for any help,

oxl

Perhaps you could do this from the camera's OnDisable event? I think this is called on objects when a new level causes them to be destroyed.