From 88b393157a54fad6e9898a33890fc41f32ab4dfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20L=C3=BCbe=C3=9F?= Date: Mon, 17 Jul 2023 04:00:30 +0200 Subject: [PATCH] Make sure we always initialize with a scene --- GlitchyEditor/src/EditorLayer.bf | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/GlitchyEditor/src/EditorLayer.bf b/GlitchyEditor/src/EditorLayer.bf index 88abe18..8c9ffd1 100644 --- a/GlitchyEditor/src/EditorLayer.bf +++ b/GlitchyEditor/src/EditorLayer.bf @@ -109,7 +109,9 @@ namespace GlitchyEditor if (args.Count >= 1) LoadSceneFile(args[0]); - else + + // Create a new scene, if LoadSceneFile failed + if (_activeScene == null) NewScene(); } @@ -199,7 +201,6 @@ namespace GlitchyEditor if (_sceneState != .Edit && _isPaused) updateMode = .None; - _activeScene.Update(gameTime, updateMode); // Clear the swapchain-buffer