Skip to content

Commit ba48577

Browse files
empty2filljwindgassen
authored andcommitted
Support UE 4.26 - 5.0
1 parent 295ea45 commit ba48577

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Plugins/Linter/Source/TemplateLinter/Private/TemplateNamingConvention.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@
33

44
#include "IAssetTypeActions.h"
55
#include "AssetToolsModule.h"
6+
#include "Misc/EngineVersionComparison.h"
7+
#if UE_VERSION_NEWER_THAN(5, 0, 0)
8+
#include "Misc/NamePermissionList.h"
9+
#else
610
#include "Misc/BlacklistNames.h"
11+
#endif
712

813
UTemplateNamingConvention::UTemplateNamingConvention(const FObjectInitializer& ObjectInitializer)
914
: Super(ObjectInitializer)
@@ -35,7 +40,11 @@ UTemplateNamingConvention::UTemplateNamingConvention(const FObjectInitializer& O
3540
};
3641
AssetTypeActionsList.Sort(FCompareIAssetTypeActions());
3742

43+
#if UE_VERSION_NEWER_THAN(5, 0, 0)
44+
TSharedRef<FNamePermissionList> AssetClassBlacklist = AssetToolsModule.Get().GetAssetClassPermissionList();
45+
#else
3846
TSharedRef<FBlacklistNames> AssetClassBlacklist = AssetToolsModule.Get().GetAssetClassBlacklist();
47+
#endif
3948

4049
// For every asset type, add naming convention
4150
for (int32 ClassIdx = 0; ClassIdx < AssetTypeActionsList.Num(); ++ClassIdx)

0 commit comments

Comments
 (0)