Skip to content

Commit 336e4f2

Browse files
committed
Compiled for UE5
1 parent 1cdd2cd commit 336e4f2

File tree

4 files changed

+17
-12
lines changed

4 files changed

+17
-12
lines changed

Prefabricator.uplugin

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"CreatedBy" : "Code Respawn",
77
"CreatedByURL" : "http://prefabricator.dev",
88
"DocsURL": "http://docs.prefabricator.dev",
9-
"EngineVersion" : "4.26.0",
9+
"EngineVersion" : "5.0EA",
1010
"Description" : "Create Prefabs in Unreal Engine",
1111
"Category" : "Prefab",
1212
"EnabledByDefault" : true,

Source/PrefabricatorEditor/PrefabricatorEditor.Build.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ public PrefabricatorEditor(ReadOnlyTargetRules Target) : base(Target)
3939
"Kismet",
4040
"PlacementMode",
4141
"EditorWidgets",
42-
"RHI"
42+
"RHI",
43+
"ToolMenus"
4344
}
4445
);
4546

Source/PrefabricatorEditor/Private/UI/EditorUIExtender.cpp

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
#include "Framework/Notifications/NotificationManager.h"
2323
#include "Framework/SlateDelegates.h"
2424
#include "LevelEditor.h"
25+
#include "ToolMenuEntry.h"
26+
#include "ToolMenus.h"
2527
#include "Widgets/Notifications/SNotificationList.h"
2628
#include "Widgets/SNullWidget.h"
2729

@@ -246,15 +248,17 @@ void FEditorUIExtender::Extend()
246248
MenuExtenders.Add(FLevelEditorModule::FLevelViewportMenuExtender_SelectedActors::CreateStatic(&Local::OnExtendLevelEditorActorContextMenu));
247249
LevelViewportExtenderHandle = MenuExtenders.Last().GetHandle();
248250

249-
LevelToolbarExtender = MakeShareable(new FExtender);
250-
LevelToolbarExtender->AddToolBarExtension(
251-
"Settings",
252-
EExtensionHook::After,
253-
FPrefabricatorCommands::Get().LevelMenuActionList,
254-
FToolBarExtensionDelegate::CreateStatic(&Local::ExtendLevelToolbar)
255-
);
256-
257-
LevelEditorModule.GetToolBarExtensibilityManager().Get()->AddExtender(LevelToolbarExtender);
251+
UToolMenu* AssetsToolBar = UToolMenus::Get()->ExtendMenu("LevelEditor.LevelEditorToolBar.AssetsToolBar");
252+
if (AssetsToolBar) {
253+
FToolMenuSection& Section = AssetsToolBar->AddSection("Prefabricator");
254+
const FToolMenuEntry LaunchPadEntry = FToolMenuEntry::InitComboButton("Prefabricator",
255+
FUIAction(),
256+
FOnGetContent::CreateStatic(&Local::HandleShowToolbarPrefabMenu),
257+
LOCTEXT("PrefabricatorToolbarButtonText", "Prefabricator"),
258+
LOCTEXT("DAToolbarButtonTooltip", "Prefabricator Menu"),
259+
FSlateIcon(FPrefabEditorStyle::GetStyleSetName(), TEXT("Prefabricator.CreatePrefab")));
260+
Section.AddEntry(LaunchPadEntry);
261+
}
258262

259263

260264
}

Source/PrefabricatorEditor/Private/Utils/SelectionHook.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ void FPrefabricatorSelectionHook::OnObjectSelected(UObject* Object)
101101

102102
if (CustomSelection) {
103103
bSelectionGuard = true;
104-
GEditor->SelectActor(RequestedActor, false, true);
105104
GEditor->SelectActor(CustomSelection, true, true);
105+
GEditor->SelectActor(RequestedActor, false, true);
106106
bSelectionGuard = false;
107107

108108
LastSelectedObject = CustomSelection;

0 commit comments

Comments
 (0)