Check whether MjScene exists in components' OnDisable()
This commit is contained in:
@@ -99,7 +99,7 @@ public abstract class MjComponent : MonoBehaviour {
|
||||
}
|
||||
|
||||
public void OnDisable() {
|
||||
if (!_exiting) {
|
||||
if (!_exiting && MjScene.InstanceExists) {
|
||||
MjScene.Instance.SceneRecreationAtLateUpdateRequested = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user