+2
Pending Review

Some objects were not cleaned up when closing the scene. (Did you spawn new GameObjects from OnDestroy?) The following scene GameObjects were found: Scene Variables

Mohammad Ismail 12 months ago updated by michele 3 months ago 3

Some objects were not cleaned up when closing the scene. (Did you spawn new GameObjects from OnDestroy?)

The following scene GameObjects were found:

Scene Variables

I keep getting this error just not sure why I tried to delete scene variables but I still got nothing

Bolt Version:
Unity Version:
Platform(s):
Scripting Backend:
.NET Version (API Compatibility Level):
Pending Review

Hi Mohammad,

Sorry you're having this issue.

Can you provide steps we could follow to reproduce it? Or an example project?

Also, does the issue persist when you restart Unity?

Same (harmless)  problem by the way. I think it is somehow connected with States Flow. I've created "Any state" node and connected with empty node with "Application quit" event and it is help a little bit, but sometimes it is still there

The problem is that On Exist State is called when loading a new scene
So for example, if you modify a Scene Variables variable On Exit State, then when you load a new scene Scene Variables get destroyed and after that your state machine tries to modify one of its variable