Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion engine/Sandbox.Tools/Qt/DockManager.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using Sandbox.Utility;
using Sandbox.Engine;
using Sandbox.Internal;
using System;

namespace Editor;
Expand Down Expand Up @@ -328,7 +330,13 @@ internal IntPtr OnCreateDock( string name, string managedType )

var session = SceneEditorSession.CreateFromPath( path );

// If we can't open it (deleted?) just make a blank
if ( session is null && (string.IsNullOrEmpty( path ) || path == "untitled") )
{
var minimalScenePath = "scenes/minimal.scene";
session = SceneEditorSession.CreateFromPath( minimalScenePath );
}

// If we still can't open it (deleted? or minimal.scene doesn't exist?), just make a blank
if ( session is null )
session = SceneEditorSession.CreateDefault();

Expand Down