I ran into an issue where a schedule destruction of an entity was causing a crash if the scene changed before the scheduled event fired.
This smells a little bit fishy, cause I would expect the entity to get destroyed on scene changed, or at least caught by the GC, and thus give an error that the target of the destruction is null. But instead I'm getting an exception saying that the Scene is null, implying that the entity is sticking around after a scene change.
If there's an underlying problem here then this PR does not fix that, but it does fix the one specific issue I had.
I ran into an issue where a schedule destruction of an entity was causing a crash if the scene changed before the scheduled event fired. This smells a little bit fishy, cause I would expect the entity to get destroyed on scene changed, or at least caught by the GC, and thus give an error that the target of the destruction is null. But instead I'm getting an exception saying that the Scene is null, implying that the entity is sticking around after a scene change. If there's an underlying problem here then this PR does not fix that, but it does fix the one specific issue I had.