Kismet nodes now have their own module to themselves, so Unreal Engine can compile a shipping build correctly.
This commit is contained in:
@@ -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<FComboInputNodesModule>("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;
|
||||
};
|
||||
@@ -0,0 +1,62 @@
|
||||
// ©2023 Batty Bovine Productions, LLC. All Rights Reserved.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "K2Node.h"
|
||||
#include "K2Node_EventNodeInterface.h"
|
||||
#include "EdGraph/EdGraphNodeUtils.h"
|
||||
|
||||
#include "K2Node_ComboAction.generated.h"
|
||||
|
||||
|
||||
class UInputAction;
|
||||
enum class ETriggerEvent : uint8;
|
||||
namespace ENodeTitleType { enum Type : int; }
|
||||
struct FBlueprintNodeSignature;
|
||||
|
||||
class FBlueprintActionDatabaseRegistrar;
|
||||
class FKismetCompilerContext;
|
||||
|
||||
|
||||
UCLASS()
|
||||
class COMBOINPUTNODES_API UK2Node_ComboAction : public UK2Node, public IK2Node_EventNodeInterface
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
UK2Node_ComboAction(const FObjectInitializer &ObjectInitializer) : Super(ObjectInitializer){}
|
||||
|
||||
UPROPERTY() TObjectPtr<const class UComboAction> ComboAction;
|
||||
|
||||
//~ Begin UEdGraphNode Interface.
|
||||
virtual void AllocateDefaultPins() override;
|
||||
virtual FLinearColor GetNodeTitleColor() const override;
|
||||
virtual FText GetNodeTitle(ENodeTitleType::Type TitleType) const override;
|
||||
virtual FText GetTooltipText() const override;
|
||||
virtual FSlateIcon GetIconAndTint(FLinearColor &OutColor) const override;
|
||||
virtual bool IsCompatibleWithGraph(UEdGraph const *Graph) const override;
|
||||
virtual UObject* GetJumpTargetForDoubleClick() const override;
|
||||
virtual void JumpToDefinition() const override;
|
||||
//~ End UEdGraphNode Interface.
|
||||
|
||||
//~ Begin UK2Node Interface
|
||||
virtual void ValidateNodeDuringCompilation(class FCompilerResultsLog &MessageLog) const override;
|
||||
virtual bool ShouldShowNodeProperties() const override { return true; }
|
||||
virtual void ExpandNode(FKismetCompilerContext &CompilerContext, UEdGraph *SourceGraph) override;
|
||||
virtual void GetMenuActions(FBlueprintActionDatabaseRegistrar &ActionRegistrar) const override;
|
||||
virtual FText GetMenuCategory() const override;
|
||||
virtual bool CanUserEditPinAdvancedViewFlag() const override { return true; }
|
||||
virtual FBlueprintNodeSignature GetSignature() const override;
|
||||
//~ End UK2Node Interface
|
||||
|
||||
//~ Begin IK2Node_EventNodeInterface Interface.
|
||||
virtual TSharedPtr<FEdGraphSchemaAction> GetEventNodeAction(const FText &ActionCategory) override;
|
||||
//~ End IK2Node_EventNodeInterface Interface.
|
||||
|
||||
private:
|
||||
FName GetActionName() const;
|
||||
|
||||
/** Constructing FText strings can be costly, so we cache the node's title/tooltip */
|
||||
FNodeTextCache CachedTooltip;
|
||||
FNodeTextCache CachedNodeTitle;
|
||||
};
|
||||
Reference in New Issue
Block a user