diff --git a/Config/DefaultRWTHVRClusterPlugin.ini b/Config/DefaultRWTHVRClusterPlugin.ini deleted file mode 100644 index 59efe63d18048cce397f405d52fc6e8a2f386ad5..0000000000000000000000000000000000000000 --- a/Config/DefaultRWTHVRClusterPlugin.ini +++ /dev/null @@ -1,2 +0,0 @@ -[/Script/UnrealEd.ProjectPackagingSettings] -+DirectoriesToAlwaysCook=(Path="/RWTHVRCluster") \ No newline at end of file diff --git a/Source/RWTHVRCluster/Private/RWTHVRCluster.cpp b/Source/RWTHVRCluster/Private/RWTHVRCluster.cpp index 5632551f90a26458579d02705077b14faad5305c..a43e1e385b0647febf51afb552a93cd0f394b204 100644 --- a/Source/RWTHVRCluster/Private/RWTHVRCluster.cpp +++ b/Source/RWTHVRCluster/Private/RWTHVRCluster.cpp @@ -1,11 +1,31 @@ #include "RWTHVRCluster.h" + +#include "GameDelegates.h" +#include "Logging/StructuredLog.h" + #define LOCTEXT_NAMESPACE "FRWTHVRClusterModule" -void FRWTHVRClusterModule::StartupModule() { ClusterConsole.Register(); } +void FRWTHVRClusterModule::StartupModule() +{ + ClusterConsole.Register(); + + FGameDelegates::Get().GetModifyCookDelegate().AddRaw(this, &FRWTHVRClusterModule::GetPackagesToAlwaysCook); +} void FRWTHVRClusterModule::ShutdownModule() { ClusterConsole.Unregister(); } +void FRWTHVRClusterModule::GetPackagesToAlwaysCook(TConstArrayView<const ITargetPlatform*> InTargetPlatforms, + TArray<FName>& InOutPackagesToCook, + TArray<FName>& InOutPackagesToNeverCook) +{ + InOutPackagesToCook.Add("/RWTHVRCluster/Config/aixcave.aixcave"); + InOutPackagesToCook.Add("/RWTHVRCluster/Config/aixcave_two_player.aixcave_two_player"); + + UE_LOGFMT(LogTemp, Display, + "GetPackagesToAlwaysCook delegate called, adding aixcave configs to always cook list..."); +} + #undef LOCTEXT_NAMESPACE IMPLEMENT_MODULE(FRWTHVRClusterModule, RWTHVRCluster) diff --git a/Source/RWTHVRCluster/Public/RWTHVRCluster.h b/Source/RWTHVRCluster/Public/RWTHVRCluster.h index 71a7693ca67b6ff50ff31fd10125e3803102b9b8..24323555721580d90e40a39e82a2a735a10d83c8 100644 --- a/Source/RWTHVRCluster/Public/RWTHVRCluster.h +++ b/Source/RWTHVRCluster/Public/RWTHVRCluster.h @@ -10,6 +10,9 @@ public: virtual void StartupModule() override; virtual void ShutdownModule() override; + void GetPackagesToAlwaysCook(TConstArrayView<const ITargetPlatform*> InTargetPlatforms, + TArray<FName>& InOutPackagesToCook, TArray<FName>& InOutPackagesToNeverCook); + private: FClusterConsole ClusterConsole; };