Add Physics::DeleteScene

This commit is contained in:
2026-06-03 05:03:32 +02:00
parent c2ec3fe2cb
commit f4be035f04
2 changed files with 14 additions and 0 deletions
+9
View File
@@ -184,6 +184,15 @@ PhysicsScene* Physics::FindScene(const StringView& name)
return nullptr;
}
void Physics::DeleteScene(PhysicsScene* scene)
{
if (scene == nullptr || scene == DefaultScene)
return;
scene->CollectResults();
Scenes.RemoveKeepOrder(scene);
Delete(scene);
}
bool Physics::GetAutoSimulation()
{
return !DefaultScene || DefaultScene->GetAutoSimulation();