internal static void UnloadData() { MyActorFactory.RemoveAll(); // many-to-one relation, can live withput owners, deallocated separately // MyComponentFactory<MyInstancingComponent>.RemoveAll(); //MyVoxelMesh.RemoveAll(); //MyDynamicMesh.RemoveAll(); MyRender11.Log.WriteLine("Unloading session data"); MyScene.DynamicRenderablesDBVH.Clear(); if (MyScene.SeparateGeometry) { MyScene.StaticRenderablesDBVH.Clear(); } MyScene.GroupsDBVH.Clear(); MyScene.FoliageDBVH.Clear(); MyClipmapFactory.RemoveAll(); MyClipmap.UnloadCache(); MyInstancing.OnSessionEnd(); MyFoliageComponents.OnSessionEnd(); MyMeshes.OnSessionEnd(); MyLights.OnSessionEnd(); MyMaterials1.OnSessionEnd(); MyVoxelMaterials1.OnSessionEnd(); MyMeshMaterials1.OnSessionEnd(); MyScreenDecals.OnSessionEnd(); MyTextures.OnSessionEnd(); MyBigMeshTable.Table.OnSessionEnd(); MyPrimitivesRenderer.Unload(); //MyAssetsLoader.ClearMeshes(); }