Files
UnrealEngineUWP/Engine/Source/Editor/BlueprintGraph/Classes/K2Node_BaseAsyncTask.h
Michael Noland 7c6de5a482 #ue4
Various improvements to UK2Node_BaseAsyncTask:
- Moved node enumeration from the menu builder into the node
- Added the latent icon to the corner of the node
- Added optional support for a separate Activate call on the proxy object, allowing immediate success/failure instead of having to delay it a frame
- Added default behavior for category and node title, pulling it from the factory function

[CL 2049507 by Michael Noland in Main branch]
2014-04-23 19:30:38 -04:00

53 lines
1.7 KiB
C++

// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
#pragma once
#include "EdGraphSchema_K2_Actions.h"
#include "K2Node_BaseAsyncTask.generated.h"
UCLASS(Abstract)
class BLUEPRINTGRAPH_API UK2Node_BaseAsyncTask : public UK2Node
{
GENERATED_UCLASS_BODY()
// UEdGraphNode interface
virtual void AllocateDefaultPins() OVERRIDE;
virtual void GetMenuEntries(FGraphContextMenuBuilder& ContextMenuBuilder) const OVERRIDE;
virtual FString GetTooltip() const OVERRIDE;
virtual FText GetNodeTitle(ENodeTitleType::Type TitleType) const OVERRIDE;
// End of UEdGraphNode interface
// UK2Node interface
virtual void ExpandNode(class FKismetCompilerContext& CompilerContext, UEdGraph* SourceGraph) OVERRIDE;
virtual bool HasExternalBlueprintDependencies(TArray<class UStruct*>* OptionalOutput) const OVERRIDE;
virtual FName GetCornerIcon() const OVERRIDE;
// End of UK2Node interface
protected:
virtual FString GetCategoryName();
// Creates a default menu entry
TSharedPtr<FEdGraphSchemaAction_K2NewNode> CreateDefaultMenuEntry(UK2Node_BaseAsyncTask* NodeTemplate, FGraphContextMenuBuilder& ContextMenuBuilder) const;
// Returns the factory function (checked)
UFunction* GetFactoryFunction() const;
protected:
// The name of the function to call to create a proxy object
UPROPERTY()
FName ProxyFactoryFunctionName;
// The class containing the proxy object functions
UPROPERTY()
UClass* ProxyFactoryClass;
// The type of proxy object that will be created
UPROPERTY()
UClass* ProxyClass;
// The name of the 'go' function on the proxy object that will be called after delegates are in place, can be NAME_None
UPROPERTY()
FName ProxyActivateFunctionName;
};