Skip to content

Commit 1bcbbcc

Browse files
committed
Fix issue with opening linked scene that was already opened before
1 parent f22a048 commit 1bcbbcc

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

ContentEditor.App/EngineObjects/Scene.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,8 @@ public void RequestLoadChildScene(Folder childFolder, LoadType subfolderLoadType
130130
if (scene == null) return;
131131

132132
var childSceneRoot = scene.GetSharedInstance(Workspace.Env);
133-
var childScene = childSceneRoot.Scene;
134-
if (childScene == null) {
135-
childFolder.ChildScene = SceneManager.CreateScene(envScene, IsActive, this, childSceneRoot);
136-
}
133+
childFolder.ChildScene = childSceneRoot.Scene ?? SceneManager.CreateScene(envScene, IsActive, this, childSceneRoot);
134+
137135
if ((subfolderLoadType & LoadType.LoadChildren) != 0 && childFolder.ChildScene != null)
138136
{
139137
var childrenLoadType = subfolderLoadType;

0 commit comments

Comments
 (0)