/// <summary> /// Unloads everything that was used in the scene /// </summary> internal void OnUnload() { Entities.Objects.For(d => Destroy(d.Script)); Entities.UnloadObjects.For(un => un.OnUnload()); Physics.Clear(); Unload(); Content.Unload(); QPrefs.Save().Wait(); }