From a06a0798041e22ee6f48a9b5195f33be75982190 Mon Sep 17 00:00:00 2001 From: nothingTVatYT Date: Tue, 28 Nov 2023 00:37:29 +0100 Subject: [PATCH] change submenu name to the shorter and less complicated "Add Scene" --- Source/Editor/Windows/SceneTreeWindow.ContextMenu.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Source/Editor/Windows/SceneTreeWindow.ContextMenu.cs b/Source/Editor/Windows/SceneTreeWindow.ContextMenu.cs index 3e078bcb8..6261c0c07 100644 --- a/Source/Editor/Windows/SceneTreeWindow.ContextMenu.cs +++ b/Source/Editor/Windows/SceneTreeWindow.ContextMenu.cs @@ -158,13 +158,16 @@ namespace FlaxEditor.Windows if (unloadedScenes.Count > 0) { contextMenu.AddSeparator(); - var childCM = contextMenu.GetOrAddChildMenu("Open Scene additionally"); + var childCM = contextMenu.GetOrAddChildMenu("Add Scene"); foreach (var sceneGuid in unloadedScenes.Where(sceneGuid => !Level.FindScene(sceneGuid))) { if (FlaxEngine.Content.GetAssetInfo(sceneGuid, out var unloadedScene)) { var splitPath = unloadedScene.Path.Split('/'); - childCM.ContextMenu.AddButton(splitPath[^1], () => { Editor.Instance.Scene.OpenScene(sceneGuid, true); }); + var sceneName = splitPath[^1]; + if (splitPath[^1].EndsWith(".scene")) + sceneName = sceneName[..^6]; + childCM.ContextMenu.AddButton(sceneName, () => { Editor.Instance.Scene.OpenScene(sceneGuid, true); }); } } }