Keep Entities selected when switching between Play- and Edit-Mode

- Fixed the check whether all selected entities have the same parent
This commit is contained in:
Simon Lübeß
2023-11-29 14:16:36 +01:00
parent 0257b93c7b
commit b68bad5bda
4 changed files with 71 additions and 40 deletions
+2 -2
View File
@@ -492,7 +492,7 @@ namespace GlitchyEditor
for (var (entity, transform, camera) in _activeScene.GetEntities<TransformComponent, CameraComponent>())
{
if (_editor.EntityHierarchyWindow.SelectedEntities.Contains(.(entity, _activeScene)))
if (_editor.EntityHierarchyWindow.IsEntitySelected(.(entity, _activeScene)))
{
DebugRenderer.DrawViewFrustum(transform.WorldTransform, camera.Camera.Projection, .White);
}
@@ -506,7 +506,7 @@ namespace GlitchyEditor
for (var (entity, transform, light) in _activeScene.GetEntities<TransformComponent, LightComponent>())
{
if (_editor.EntityHierarchyWindow.SelectedEntities.Contains(.(entity, _activeScene)))
if (_editor.EntityHierarchyWindow.IsEntitySelected(.(entity, _activeScene)))
{
Renderer.DrawRay(.Zero, .(0, 0, 20), ColorRGBA(light.SceneLight.Color, 1.0f), transform.WorldTransform);