Skip to content

Commit d5296a8

Browse files
committed
feat: add fallback default ecsact runtime library path
1 parent 3bae963 commit d5296a8

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

Source/Ecsact/Public/EcsactUnreal/EcsactSettings.cpp

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,22 @@
44
UEcsactSettings::UEcsactSettings() {
55
}
66

7+
auto UEcsactSettings::GetDefaultEcsactRuntimeLibraryPath() const -> FString {
8+
return FPaths::Combine(
9+
FPaths::ProjectDir(),
10+
TEXT("Binaries/Win64/EcsactRuntime.dll")
11+
);
12+
}
13+
714
auto UEcsactSettings::GetEcsactRuntimeLibraryPath() const -> FString {
815
#if WITH_EDITORONLY_DATA
916
if(bEnableBuild) {
10-
return FPaths::Combine(
11-
FPaths::ProjectDir(),
12-
TEXT("Binaries/Win64/EcsactRuntime.dll")
13-
);
17+
return GetDefaultEcsactRuntimeLibraryPath();
18+
}
19+
#endif
20+
21+
if(CustomEcsactRuntimeLibraryPath.IsEmpty()) {
22+
return GetDefaultEcsactRuntimeLibraryPath();
1423
} else {
1524
if(!FPaths::IsRelative(CustomEcsactRuntimeLibraryPath)) {
1625
return CustomEcsactRuntimeLibraryPath;
@@ -21,12 +30,6 @@ auto UEcsactSettings::GetEcsactRuntimeLibraryPath() const -> FString {
2130
);
2231
}
2332
}
24-
#else
25-
return FPaths::Combine(
26-
FPaths::ProjectDir(),
27-
TEXT("Binaries/Win64/EcsactRuntime.dll")
28-
);
29-
#endif
3033
}
3134

3235
#if WITH_EDITORONLY_DATA

Source/Ecsact/Public/EcsactUnreal/EcsactSettings.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ class ECSACT_API UEcsactSettings : public UObject {
7373
)
7474
TArray<FString> Recipes;
7575

76+
auto GetDefaultEcsactRuntimeLibraryPath() const -> FString;
77+
7678
auto GetEcsactRuntimeLibraryPath() const -> FString;
7779

7880
auto GetValidRecipes() const -> TArray<FString>;

0 commit comments

Comments
 (0)