Hello
I have a problem I tried solving for hours. I searched forums but found nothing similar.
I used debugger to find out that an object is persisting through multiple scenes, even though it is not static, has no static variables and doesn’t use DontDestroyOnLoad either.
So why is it persisting?
I cant figure it out
More info:
The script is a base class that others inherit from.
I put debug.log statements in OnDisable method in this base class and also on child class. The child class do get destroyed and the debug.log in its OnDisable is called just fine. But OnDisable is never called on parent class.
Yes I use events, and yes, I do remember to unsubscribe at OnDisable. Not that it matters if it isn’t called.
In the scene where it is first created it is interacting with Singletons and other stuff. Could it be that it is not allowed to be destroyed because of some connection to those?
I hope someone can help
Many thanks in advance
Jan