UBlueprintNodeSpawner

Intended to be wrapped and used by [FBlueprintActionMenuItem](API\Editor\Kismet\FBlueprintActionMenuItem).

Unreal Engine C++ API Reference > Editor > BlueprintGraph

Inheritance Hierarchy

References

   
Module BlueprintGraph
Header /Engine/Source/Editor/BlueprintGraph/Public/BlueprintNodeSpawner.h
Include #include "BlueprintNodeSpawner.h"

Syntax

class UBlueprintNodeSpawner :  
    public [UObject](API\Runtime\CoreUObject\UObject\UObject),  
    public [IBlueprintNodeBinder](API\Editor\BlueprintGraph\IBlueprintNodeBinder)  

Remarks

Intended to be wrapped and used by FBlueprintActionMenuItem. Rather than sub-classing the menu item, we choose to subclass this instead (for different node types). That way, we get the type inference that comes with UObjects (and we don't have to continuously compare identification strings).

Variables

Type Name Description
FCustomizeNodeD... CustomizeNodeDelegate A delegate to perform specialized node setup post-spawn (so you don't have to sub-class this for every node type).
FBlueprintActio... DefaultMenuSignature Defines how this spawner is presented in the ui
FUiSpecOverride... DynamicUiSignatureGetter Provides a way to override DefaultMenuSignature based off blueprint/graph/menu context
TSubclassOf< UE... NodeClass Holds the node type that this spawner will instantiate.

Constructors

Type Name Description
  UBlueprintNodeSpawner ( const FObjectInitializer& ObjectIn... )  

Functions

Type Name Description
void ClearCachedTemplateNode () Removes the spawner's cached template node (if it has one), meaning that the next GetTemplateNode() call will spawn a new one (and that calls to GetCachedTemplateNode() will return null).
UBlueprintNo... Create ( TSubclassOf< UEdGraphNode > const N..., UObject* Outer, FCustomizeNodeDelegate PostSpawnDel... ) Creates a new UBlueprintNodeSpawner for the specified node class.
UBlueprintNo... Create ( UObject* Outer, FCustomizeNodeDelegate PostSpawnDel... ) Templatized version of the above Create() method (where we specify the spawner's node class through the template argument).
UEdGraphNode... GetCachedTemplateNode () Retrieves a cached template for the node that this is set to spawn.
FBlueprintNo... GetSpawnerSignature () We want to be able to compare spawners, and have a signature that is rebuildable on subsequent runs.
UEdGraphNode... GetTemplateNode ( UEdGraph* TargetGraph, FBindingSet const& Bindings ) Retrieves a cached template for the node that this is set to spawn.
FBlueprintAc... GetUiSpec ( FBlueprintActionContext const& Con..., FBindingSet const& Bindings ) Takes the default FBlueprintActionUiSpec and modifies it dynamically to accommodate the current context.
UEdGraphNode... Invoke ( UEdGraph* ParentGraph, FBindingSet const& Bindings, FVector2D const Location ) Takes care of spawning a node for the specified graph.
bool IsTemplateNodeFilteredOut ( FBlueprintActionFilter const& Filt... ) Determine if the node of this spawner's template's type should be filtered in the actions menu
void Prime () Not required, but intended to passively help speed up menu building operations.
FBlueprintAc... PrimeDefaultUiSpec ( UEdGraph* TargetGraph ) Takes the FBlueprintActionUiSpec that this was spawned with and attempts to fill in any missing fields (by polling a template node).
NodeType ... SpawnNode ( UEdGraph* ParentGraph, FBindingSet const& Bindings, FVector2D const Location, FCustomizeNodeDelegate PostSpawnDel... ) Simplified version of the other SpawnNode(), that just let's sub-classes specify their own post-spawn delegate (the node class is comes directly from the template parameter).
NodeType ... SpawnNode ( TSubclassOf< UEdGraphNode > NodeCla..., UEdGraph* ParentGraph, FBindingSet const& Bindings, FVector2D const Location, FCustomizeNodeDelegate PostSpawnDel... ) Protected SpawnNode() that let's sub-classes specify their own post-spawn delegate and node class.

Overridden from UObject

Type Name Description
void BeginDestroy () Called before destroying the object.

Overridden from IBlueprintNodeBinder

Type Name Description
bool BindToNode ( UEdGraphNode* Node, FBindingObject Binding ) Attempts to apply the specified binding to the supplied node.
bool CanBindMultipleObjects () Determines if this will accept more than one binding (used to block multiple bindings from being applied to nodes that can only have one).
bool IsBindingCompatible ( FBindingObject BindingCandidate ) Checks to see if the specified object can be bound by this.

Typedefs


Ask questions and help your peers Developer Forums

Write your own tutorials or read those from others Learning Library