Skip to content

Commit

Permalink
Support Unreal Engine 5.4
Browse files Browse the repository at this point in the history
  • Loading branch information
nutti committed May 3, 2024
1 parent 283e2b4 commit 35f266d
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 16 deletions.
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ workflows:
- unreal-engine-ci
matrix:
parameters:
# TODO: The container image is not supported for 5.4.0.
unreal-engine-version: [
"4.27.0", "5.0.0", "5.1.0", "5.2.0", "5.3.0"
]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
fail-fast: false
matrix:
unreal_engine_version:
["4.27.0", "5.0.0", "5.1.0", "5.2.0", "5.3.0"]
["4.27.0", "5.0.0", "5.1.0", "5.2.0", "5.3.0", "5.4.0"]
version:
["free", "full"]
steps:
Expand Down
2 changes: 1 addition & 1 deletion BlueprintToRSTDoc/BlueprintToRSTDoc.uplugin
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"VersionName": "1.1",
"FriendlyName": "Blueprint to reStructuredText Document",
"Description": "Generate reStructuredText (RST) Format Documents from Blueprints",
"EngineVersion": "5.3.0",
"EngineVersion": "5.4.0",
"Category": "Other",
"CreatedBy": "nutti (Colorful Pico)",
"CreatedByURL": "https://github.com/nutti/UEPlugin-BlueprintToRSTDoc",
Expand Down
12 changes: 12 additions & 0 deletions BlueprintToRSTDoc/Source/BlueprintToRSTDoc/Private/BPLibrary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,11 @@ bool GetBlueprintAssets(TArray<FAssetData>& Blueprints, const TArray<FString>& E
FARFilter Filter;
Filter.bRecursivePaths = true;
Filter.bIncludeOnlyOnDiskAssets = true;
#if UE_VERSION_NEWER_THAN(5, 1, 0)
Filter.ClassPaths.Add(UBlueprint::StaticClass()->GetClassPathName());
#else
Filter.ClassNames.Add(UBlueprint::StaticClass()->GetFName());
#endif
Filter.bRecursiveClasses = true;

if (!AssetRegistry.GetAssets(Filter, Blueprints))
Expand Down Expand Up @@ -510,7 +514,11 @@ bool GetStructureAssets(TArray<FAssetData>& ScriptStructs, const TArray<FString>
FARFilter Filter;
Filter.bRecursivePaths = true;
Filter.bIncludeOnlyOnDiskAssets = true;
#if UE_VERSION_NEWER_THAN(5, 1, 0)
Filter.ClassPaths.Add(UUserDefinedStruct::StaticClass()->GetClassPathName());
#else
Filter.ClassNames.Add(UUserDefinedStruct::StaticClass()->GetFName());
#endif
Filter.bRecursiveClasses = true;

if (!AssetRegistry.GetAssets(Filter, ScriptStructs))
Expand Down Expand Up @@ -553,7 +561,11 @@ bool GetEnumerationAssets(TArray<FAssetData>& Enums, const TArray<FString>& Excl
FARFilter Filter;
Filter.bRecursivePaths = true;
Filter.bIncludeOnlyOnDiskAssets = true;
#if UE_VERSION_NEWER_THAN(5, 1, 0)
Filter.ClassPaths.Add(UUserDefinedEnum::StaticClass()->GetClassPathName());
#else
Filter.ClassNames.Add(UUserDefinedEnum::StaticClass()->GetFName());
#endif
Filter.bRecursiveClasses = true;

if (!AssetRegistry.GetAssets(Filter, Enums))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ public class FunctionalTestTarget : TargetRules
public FunctionalTestTarget(TargetInfo Target) : base(Target)
{
Type = TargetType.Game;
DefaultBuildSettings = BuildSettingsVersion.V4;
IncludeOrderVersion = EngineIncludeOrderVersion.Unreal5_3;
DefaultBuildSettings = BuildSettingsVersion.Latest;
ExtraModuleNames.Add("FunctionalTest");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,23 @@ bool FFuntionalTestSyncVersion::RunTest(const FString& Parameters)
// Generate RST documents.
bool bSuccess;
FString ErrorMessage;
UBlueprintToRSTDocBPLibrary::GenerateRSTDoc(
OutputDirectory, {"ChaosNiagara", "Engine", "DatasmithContent", "Niagara"}, bSuccess, ErrorMessage);
TArray<FString> ExcludePaths = {
"ChaosNiagara",
"Engine",
"DatasmithContent",
"Niagara",
"ChaosVD",
"Takes",
"AudioWidgets",
"ControlRig",
"ControlRigModules",
"ControlRigSpline",
};
UBlueprintToRSTDocBPLibrary::GenerateRSTDoc(OutputDirectory, ExcludePaths, bSuccess, ErrorMessage);
if (!bSuccess)
{
UE_LOG(LogTemp, Error, TEXT("%s"), *ErrorMessage);
return 1;
return false;
}

IFileManager& FileManager = FFileManagerGeneric::Get();
Expand All @@ -51,7 +62,7 @@ bool FFuntionalTestSyncVersion::RunTest(const FString& Parameters)
{
UE_LOG(LogTemp, Error, TEXT("Number of Files is not matched: %d (Expected) vs %d (Actual)"), ExpectedFiles.Num(),
ActualFiles.Num());
return 1;
return false;
}

TMap<FString, FString> FilePairs;
Expand All @@ -62,7 +73,7 @@ bool FFuntionalTestSyncVersion::RunTest(const FString& Parameters)
if (Index == INDEX_NONE)
{
UE_LOG(LogTemp, Error, TEXT("Not Found: %s"), *FileName);
return 1;
return false;
}

FString Expected;
Expand All @@ -72,11 +83,11 @@ bool FFuntionalTestSyncVersion::RunTest(const FString& Parameters)
if (Expected != Actual)
{
UE_LOG(LogTemp, Error, TEXT("File Content does not match (File: %s)"), *E);
return 1;
return false;
}
}

PlatformFile.DeleteDirectoryRecursively(*OutputDirectory);

return 0;
return true;
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ public class FunctionalTestEditorTarget : TargetRules
public FunctionalTestEditorTarget(TargetInfo Target) : base(Target)
{
Type = TargetType.Editor;
DefaultBuildSettings = BuildSettingsVersion.V4;
IncludeOrderVersion = EngineIncludeOrderVersion.Unreal5_3;
DefaultBuildSettings = BuildSettingsVersion.Latest;
ExtraModuleNames.Add("FunctionalTest");
}
}
2 changes: 1 addition & 1 deletion tools/remove_code.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set -eEu

SUPPORTED_VERSIONS=(
"4.26.0" "4.27.0"
"5.0.0" "5.1.0" "5.2.0" "5.3.0"
"5.0.0" "5.1.0" "5.2.0" "5.3.0" "5.4.0"
)

function usage() {
Expand Down
4 changes: 2 additions & 2 deletions tools/replace_engine_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set -eEu

SUPPORTED_VERSIONS=(
"4.26.0" "4.27.0"
"5.0.0" "5.1.0" "5.2.0" "5.3.0"
"5.0.0" "5.1.0" "5.2.0" "5.3.0" "5.4.0"
)

function usage() {
Expand Down Expand Up @@ -35,6 +35,6 @@ fi

# shellcheck disable=SC2044
for file in $(find "${source_dir}" -name "*.uplugin"); do
sed -i -e "s/\"EngineVersion\": \"5.3.0\",/\"EngineVersion\": \"${engine_version}\",/g" "${file}"
sed -i -e "s/\"EngineVersion\": \"5.4.0\",/\"EngineVersion\": \"${engine_version}\",/g" "${file}"
echo "Replaced engine version in ${file}"
done

0 comments on commit 35f266d

Please sign in to comment.