Skip to content

Commit 4c1ad53

Browse files
committed
Merge branch 'dev5' into 5.0
2 parents 7989ffc + 4d3c920 commit 4c1ad53

File tree

4 files changed

+16
-4
lines changed

4 files changed

+16
-4
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
CHANGELOG: Prefabricator
22
========================
3+
Version 1.8.1
4+
-------------
5+
* CRITICAL FIX: Fixed a crash issue while creating a Prefab from the menu [@LucenDev]
6+
37
Version 1.8.0
48
-------------
59
* New: Support for Unreal Engine 5.0

Prefabricator.uplugin

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"FileVersion" : 3,
33
"FriendlyName" : "Prefabricator",
4-
"Version" : 24,
5-
"VersionName" : "1.7.0-ea2",
4+
"Version" : 25,
5+
"VersionName" : "1.8.1",
66
"CreatedBy" : "Code Respawn",
77
"CreatedByURL" : "http://prefabricator.dev",
88
"DocsURL": "http://docs.prefabricator.dev",

Source/PrefabricatorEditor/PrefabricatorEditor.Build.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ public PrefabricatorEditor(ReadOnlyTargetRules Target) : base(Target)
5555
"LevelEditor",
5656
"EditorStyle",
5757
"ContentBrowser",
58+
"ContentBrowserData",
5859
"Projects",
5960
"PrefabricatorRuntime",
6061
// ... add private dependencies that you statically link with here ...

Source/PrefabricatorEditor/Private/Utils/PrefabEditorTools.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include "EngineModule.h"
2020
#include "EngineUtils.h"
2121
#include "Framework/Notifications/NotificationManager.h"
22+
#include "IContentBrowserDataModule.h"
2223
#include "IContentBrowserSingleton.h"
2324
#include "Kismet/KismetRenderingLibrary.h"
2425
#include "LegacyScreenPercentageDriver.h"
@@ -33,8 +34,14 @@ namespace {
3334
IContentBrowserSingleton& ContentBrowserSingleton = FModuleManager::LoadModuleChecked<FContentBrowserModule>("ContentBrowser").Get();
3435
TArray<FString> SelectedFolders;
3536
ContentBrowserSingleton.GetSelectedPathViewFolders(SelectedFolders);
36-
FString AssetFolder = SelectedFolders.Num() > 0 ? SelectedFolders[0] : "/Game";
37-
FString AssetPath = AssetFolder + "/" + InAssetName;
37+
const FString VirtualAssetFolder = SelectedFolders.Num() > 0 ? SelectedFolders[0] : "/All/Game";
38+
39+
FString AssetFolder;
40+
const EContentBrowserPathType PathType = IContentBrowserDataModule::Get().GetSubsystem()->TryConvertVirtualPath(VirtualAssetFolder, AssetFolder);
41+
if (PathType != EContentBrowserPathType::Internal) {
42+
AssetFolder = "/Game";
43+
}
44+
const FString AssetPath = AssetFolder + "/" + InAssetName;
3845

3946
FString PackageName, AssetName;
4047
IAssetTools& AssetTools = FModuleManager::Get().LoadModuleChecked<FAssetToolsModule>("AssetTools").Get();

0 commit comments

Comments
 (0)