From b1ef780086f496c03b9b4176bd4b61b35d252779 Mon Sep 17 00:00:00 2001 From: Jamie Greunbaum Date: Wed, 20 Sep 2023 12:23:21 -0400 Subject: [PATCH] Kismet nodes now have their own module to themselves, so Unreal Engine can compile a shipping build correctly. --- ComboInput.uplugin | 5 ++ Source/ComboInput/ComboInput.Build.cs | 4 +- .../ComboInputNodes/ComboInputNodes.Build.cs | 66 +++++++++++++++++++ .../Private/ComboInputNodes.cpp | 24 +++++++ .../Private}/K2Node_ComboAction.cpp | 2 +- .../Private}/K2Node_ComboActionEvent.cpp | 2 +- .../Private}/K2Node_ComboActionEvent.h | 5 +- .../ComboInputNodes/Public/ComboInputNodes.h | 37 +++++++++++ .../Public}/K2Node_ComboAction.h | 2 +- 9 files changed, 140 insertions(+), 7 deletions(-) create mode 100644 Source/ComboInputNodes/ComboInputNodes.Build.cs create mode 100644 Source/ComboInputNodes/Private/ComboInputNodes.cpp rename Source/{ComboInput/Private/Events => ComboInputNodes/Private}/K2Node_ComboAction.cpp (99%) rename Source/{ComboInput/Private/Events => ComboInputNodes/Private}/K2Node_ComboActionEvent.cpp (95%) rename Source/{ComboInput/Private/Events => ComboInputNodes/Private}/K2Node_ComboActionEvent.h (87%) create mode 100644 Source/ComboInputNodes/Public/ComboInputNodes.h rename Source/{ComboInput/Public/Events => ComboInputNodes/Public}/K2Node_ComboAction.h (95%) diff --git a/ComboInput.uplugin b/ComboInput.uplugin index a76857f..6ff161b 100644 --- a/ComboInput.uplugin +++ b/ComboInput.uplugin @@ -17,6 +17,11 @@ "Type": "Runtime", "LoadingPhase": "PreDefault" }, + { + "Name": "ComboInputNodes", + "Type": "UncookedOnly", + "LoadingPhase": "Default" + }, { "Name": "ComboInputEditor", "Type": "Editor", diff --git a/Source/ComboInput/ComboInput.Build.cs b/Source/ComboInput/ComboInput.Build.cs index 546d216..c2d2c42 100644 --- a/Source/ComboInput/ComboInput.Build.cs +++ b/Source/ComboInput/ComboInput.Build.cs @@ -48,9 +48,7 @@ public class ComboInput : ModuleRules "SlateCore", "DeveloperSettings", - "BlueprintGraph", - "GraphEditor", - "KismetCompiler", + "Projects", } ); diff --git a/Source/ComboInputNodes/ComboInputNodes.Build.cs b/Source/ComboInputNodes/ComboInputNodes.Build.cs new file mode 100644 index 0000000..66ce17a --- /dev/null +++ b/Source/ComboInputNodes/ComboInputNodes.Build.cs @@ -0,0 +1,66 @@ +// Copyright Epic Games, Inc. All Rights Reserved. + +using UnrealBuildTool; + +public class ComboInputNodes : ModuleRules +{ + public ComboInputNodes(ReadOnlyTargetRules Target) : base(Target) + { + PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs; + bLegacyPublicIncludePaths = false; + ShadowVariableWarningLevel = WarningLevel.Error; + + PublicIncludePaths.AddRange + ( + new string[] + { + // ... add public include paths required here ... + } + ); + + + PrivateIncludePaths.AddRange + ( + new string[] + { + "ComboInputNodes/Private" + } + ); + + + PublicDependencyModuleNames.AddRange + ( + new string[] + { + "ComboInput", + } + ); + + + PrivateDependencyModuleNames.AddRange + ( + new string[] + { + "Core", + "CoreUObject", + "Engine", + "Slate", + "SlateCore", + "DeveloperSettings", + + "UnrealEd", + "BlueprintGraph", + "GraphEditor", + "KismetCompiler", + } + ); + + DynamicallyLoadedModuleNames.AddRange + ( + new string[] + { + // ... add any modules that your module loads dynamically here ... + } + ); + } +} diff --git a/Source/ComboInputNodes/Private/ComboInputNodes.cpp b/Source/ComboInputNodes/Private/ComboInputNodes.cpp new file mode 100644 index 0000000..985b5db --- /dev/null +++ b/Source/ComboInputNodes/Private/ComboInputNodes.cpp @@ -0,0 +1,24 @@ +// ©2023 Batty Bovine Productions, LLC. All Rights Reserved. + +#include "ComboInputNodes.h" + +#include "GameplayTagsManager.h" +#include "Interfaces/IPluginManager.h" + +#define LOCTEXT_NAMESPACE "FComboInputNodesModule" + + +void FComboInputNodesModule::StartupModule() +{ + // This code will execute after your module is loaded into memory; the exact timing is specified in the .uplugin file per-module +} + +void FComboInputNodesModule::ShutdownModule() +{ + // This function may be called during shutdown to clean up your module. For modules that support dynamic reloading, + // we call this function before unloading the module. +} + +#undef LOCTEXT_NAMESPACE + +IMPLEMENT_MODULE(FComboInputNodesModule, ComboInputNodes) \ No newline at end of file diff --git a/Source/ComboInput/Private/Events/K2Node_ComboAction.cpp b/Source/ComboInputNodes/Private/K2Node_ComboAction.cpp similarity index 99% rename from Source/ComboInput/Private/Events/K2Node_ComboAction.cpp rename to Source/ComboInputNodes/Private/K2Node_ComboAction.cpp index 1a508aa..5f69b71 100644 --- a/Source/ComboInput/Private/Events/K2Node_ComboAction.cpp +++ b/Source/ComboInputNodes/Private/K2Node_ComboAction.cpp @@ -1,6 +1,6 @@ // ©2023 Batty Bovine Productions, LLC. All Rights Reserved. -#include "Events/K2Node_ComboAction.h" +#include "K2Node_ComboAction.h" #include "AssetRegistry/AssetRegistryModule.h" #include "BlueprintActionDatabaseRegistrar.h" diff --git a/Source/ComboInput/Private/Events/K2Node_ComboActionEvent.cpp b/Source/ComboInputNodes/Private/K2Node_ComboActionEvent.cpp similarity index 95% rename from Source/ComboInput/Private/Events/K2Node_ComboActionEvent.cpp rename to Source/ComboInputNodes/Private/K2Node_ComboActionEvent.cpp index fe2fd97..493251e 100644 --- a/Source/ComboInput/Private/Events/K2Node_ComboActionEvent.cpp +++ b/Source/ComboInputNodes/Private/K2Node_ComboActionEvent.cpp @@ -1,6 +1,6 @@ // ©2023 Batty Bovine Productions, LLC. All Rights Reserved. -#include "Events/K2Node_ComboActionEvent.h" +#include "K2Node_ComboActionEvent.h" #include "ComboInputTriggers.h" #include "Events/ComboActionDelegateBinding.h" diff --git a/Source/ComboInput/Private/Events/K2Node_ComboActionEvent.h b/Source/ComboInputNodes/Private/K2Node_ComboActionEvent.h similarity index 87% rename from Source/ComboInput/Private/Events/K2Node_ComboActionEvent.h rename to Source/ComboInputNodes/Private/K2Node_ComboActionEvent.h index cf48ad5..7c91056 100644 --- a/Source/ComboInput/Private/Events/K2Node_ComboActionEvent.h +++ b/Source/ComboInputNodes/Private/K2Node_ComboActionEvent.h @@ -3,7 +3,10 @@ #pragma once #include "CoreMinimal.h" + +#include "ComboInputTriggers.h" #include "K2Node_Event.h" + #include "K2Node_ComboActionEvent.generated.h" @@ -12,7 +15,7 @@ * when the ComboManagerComponent activates the associated action. */ UCLASS() -class COMBOINPUT_API UK2Node_ComboActionEvent : public UK2Node_Event +class COMBOINPUTNODES_API UK2Node_ComboActionEvent : public UK2Node_Event { GENERATED_BODY() diff --git a/Source/ComboInputNodes/Public/ComboInputNodes.h b/Source/ComboInputNodes/Public/ComboInputNodes.h new file mode 100644 index 0000000..efdc78b --- /dev/null +++ b/Source/ComboInputNodes/Public/ComboInputNodes.h @@ -0,0 +1,37 @@ +// ©2023 Batty Bovine Productions, LLC. All Rights Reserved. + +#pragma once + +#include "CoreMinimal.h" +#include "Modules/ModuleInterface.h" + + +class FComboInputNodesModule : public IModuleInterface +{ +public: + + /** + * Singleton-like access to this module's interface. This is just for convenience! + * Beware of calling this during the shutdown phase, though. Your module might have been unloaded already. + * + * @return Returns singleton instance, loading the module on demand if needed + */ + static FComboInputNodesModule &Get() + { + return FModuleManager::LoadModuleChecked("ComboInputNodes"); + } + + /** + * Checks to see if this module is loaded and ready. It is only valid to call Get() if IsAvailable() returns true. + * + * @return True if the module is loaded and ready to use + */ + static bool IsAvailable() + { + return FModuleManager::Get().IsModuleLoaded("ComboInputNodes"); + } + + /** IModuleInterface implementation */ + virtual void StartupModule() override; + virtual void ShutdownModule() override; +}; diff --git a/Source/ComboInput/Public/Events/K2Node_ComboAction.h b/Source/ComboInputNodes/Public/K2Node_ComboAction.h similarity index 95% rename from Source/ComboInput/Public/Events/K2Node_ComboAction.h rename to Source/ComboInputNodes/Public/K2Node_ComboAction.h index 08a221c..93ffe35 100644 --- a/Source/ComboInput/Public/Events/K2Node_ComboAction.h +++ b/Source/ComboInputNodes/Public/K2Node_ComboAction.h @@ -19,7 +19,7 @@ class FKismetCompilerContext; UCLASS() -class COMBOINPUT_API UK2Node_ComboAction : public UK2Node, public IK2Node_EventNodeInterface +class COMBOINPUTNODES_API UK2Node_ComboAction : public UK2Node, public IK2Node_EventNodeInterface { GENERATED_BODY()