Skip to content

Commit

Permalink
make reset_viewports delete default camera entity
Browse files Browse the repository at this point in the history
  • Loading branch information
redthing1 committed Jul 16, 2024
1 parent 31e2a2c commit 24b150d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions source/re/ng/scene.d
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,12 @@ abstract class Scene {
vp.destroy();
}
viewports.length = 0;

// remove the default camera entity if it exists
auto maybe_camera = ecs.get_entity("camera");
if (maybe_camera !is null) {
ecs.remove_entity(maybe_camera);
}
}

/// called internally on scene creation
Expand Down

0 comments on commit 24b150d

Please sign in to comment.