Skip to content

ISMGraphGeneration

Module: SMAssetTools

Public Classes

Name
struct FCollapseNodesToStateMachineArgs
struct FConfigureNodeClassVariableArgs
struct FConfigureStateMachineReferenceArgs
struct FConfigureTransitionEventArgs
struct FConnectNodeVariableOutputArgs
struct FConvertStateMachineToReferenceArgs
struct FCreateLocalGraphEventNodeArgs
struct FCreateLocalGraphReadNodeArgs
struct FCreateLocalGraphWriteNodeArgs
struct FCreateNodeClassVariableArgs
struct FCreateStateNodeArgs
struct FCreateStateStackArgs
struct FCreateTransitionEdgeArgs
struct FCreateTransitionRerouteArgs
struct FCreateTransitionStackArgs
struct FFindPropertyGraphArgs
struct FFindPropertyGraphResult
struct FMergeStatesArgs
struct FMergeStatesResult
struct FNodeVariableEndpoint
struct FReplaceNodeArgs
struct FResetNodePropertyArgs
struct FSetNodePropertyArgs

Public Types

Name
enum EArrayChangeType
enum uint8 ELocalGraphReadNodeType
enum uint8 ELocalGraphWriteNodeType
enum uint8 ELocalGraphEventNodeType
enum uint8 EReplaceNodeKind

Public Functions

Name
virtual ~ISMGraphGeneration()
virtual USMGraphNode_StateNodeBase * CreateStateNode(USMBlueprint * InBlueprint, const FCreateStateNodeArgs & InStateArgs) =0
template \<typename T >
T *
CreateStateNode(USMBlueprint * InBlueprint, const FCreateStateNodeArgs & InStateArgs)
virtual USMGraphNode_TransitionEdge * CreateTransitionEdge(USMBlueprint * InBlueprint, const FCreateTransitionEdgeArgs & InTransitionArgs) =0
template \<typename T >
T *
CreateTransitionEdge(USMBlueprint * InBlueprint, const FCreateTransitionEdgeArgs & InTransitionArgs)
virtual USMGraphNode_RerouteNode * CreateTransitionReroute(USMBlueprint * InBlueprint, const FCreateTransitionRerouteArgs & InArgs) =0
virtual bool ConfigureStateMachineReference(USMGraphNode_StateMachineStateNode * InRefNode, const FConfigureStateMachineReferenceArgs & InArgs) =0
virtual USMStateInstance * CreateStateStackInstance(USMGraphNode_StateNode * InStateNode, const FCreateStateStackArgs & InStateStackArgs) =0
virtual USMTransitionInstance * CreateTransitionStackInstance(USMGraphNode_TransitionEdge * InTransitionEdge, const FCreateTransitionStackArgs & InTransitionStackArgs) =0
virtual bool SetNodePropertyValue(USMGraphNode_Base * InGraphNode, const FSetNodePropertyArgs & InPropertyArgs, FString * OutError =nullptr) =0
virtual bool FindPropertyGraph(USMGraphNode_Base * InGraphNode, const FFindPropertyGraphArgs & InArgs, FFindPropertyGraphResult & OutResult, FString * OutError =nullptr) =0
virtual bool SetPropertyGraphEditMode(USMPropertyGraph * InGraph, bool bInEnable, bool bInTransact =true) =0
virtual bool ResetNodePropertyValue(USMGraphNode_Base * InGraphNode, const FResetNodePropertyArgs & InResetArgs) =0
virtual bool RemoveNode(USMGraphNode_Base * InGraphNode) =0
virtual bool SetInitialState(USMGraphNode_StateNodeBase * InStateNode) =0
virtual USMGraph * GetRootStateMachineGraph(USMBlueprint * InBlueprint) const =0
virtual UEdGraphNode * CreateLocalGraphReadNode(USMBlueprint * InBlueprint, const FCreateLocalGraphReadNodeArgs & InArgs) =0
virtual UEdGraphNode * CreateLocalGraphWriteNode(USMBlueprint * InBlueprint, const FCreateLocalGraphWriteNodeArgs & InArgs) =0
virtual UEdGraphNode * CreateLocalGraphEventNode(USMBlueprint * InBlueprint, const FCreateLocalGraphEventNodeArgs & InArgs) =0
virtual void GetCompatibleLocalGraphNodeTypes(const UEdGraph * InTargetGraph, TArray< ELocalGraphReadNodeType > & OutReadTypes, TArray< ELocalGraphWriteNodeType > & OutWriteTypes) const =0
virtual void GetCompatibleLocalGraphEventNodeTypes(const UEdGraph * InTargetGraph, TArray< ELocalGraphEventNodeType > & OutEventTypes) const =0
virtual bool ConfigureTransitionEvent(USMGraphNode_TransitionEdge * InTransitionEdge, const FConfigureTransitionEventArgs & InArgs) =0
virtual bool CreateNodeClassVariable(UBlueprint * InNodeClassBP, const FCreateNodeClassVariableArgs & InArgs) =0
virtual bool ConfigureNodeClassVariable(UBlueprint * InNodeClassBP, const FConfigureNodeClassVariableArgs & InArgs) =0
virtual bool ConnectNodeVariableOutput(USMBlueprint * InBlueprint, const FConnectNodeVariableOutputArgs & InArgs) =0
virtual bool DisconnectNodeVariableOutput(USMBlueprint * InBlueprint, const FConnectNodeVariableOutputArgs & InArgs) =0
virtual USMGraphNode_StateMachineStateNode * CollapseNodesToStateMachine(const FCollapseNodesToStateMachineArgs & InArgs, FString * OutError =nullptr) =0
virtual bool MergeStates(const FMergeStatesArgs & InArgs, FMergeStatesResult & OutResult, FString * OutError =nullptr) =0
virtual USMGraphNode_Base * ReplaceNode(const FReplaceNodeArgs & InArgs, FString * OutError =nullptr) =0
virtual USMBlueprint * ConvertStateMachineToReference(const FConvertStateMachineToReferenceArgs & InArgs, FString * OutError =nullptr) =0

Public Types Documentation

enum EArrayChangeType

Enumerator Value Description
SetElement Set the value of the provided index, resizing the array to match if necessary.
RemoveElement Remove the element from the array at the provided index.
Clear Clear all elements from the array.
AddElement Append a default-constructed element to the end of the array.
InsertElement Insert a default-constructed element at PropertyIndex, shifting subsequent elements up.
DuplicateElement Duplicate the element at PropertyIndex; pin literals and wired property graphs are preserved.
MoveElement Reorder the element at PropertyIndex to TargetIndex, preserving element guids and wired graphs.

Handle array processing.


enum ELocalGraphReadNodeType

Enumerator Value Description
TimeInState Time the enclosing state (or the source state of the enclosing transition) has been active.
HasStateUpdated True when the enclosing state has had at least one OnStateUpdate fire.
CanEvaluate Wired in transition graphs only. True when the transition is allowed to evaluate.
CanEvaluateFromEvent Wired in transition graphs only. True when the transition is being evaluated from an event.
GetStateInformation Returns the FSMStateInfo for the enclosing state.
GetTransitionInformation Returns the FSMTransitionInfo for the enclosing transition.
GetStateMachineReference Returns a typed reference to the state-machine instance owned by the enclosing state-machine-reference state. Compatible only with a state-machine-reference state's intermediate graph (the bound graph of a USMGraphNode_StateMachineStateNode).
GetNodeInstance Returns the USMNodeInstance for the enclosing state (or stack instance, when targeting a stack).
InEndState True when the sub-state-machine reached by the source state's reference has reached an end state. Compatible only with a transition graph whose source state is a state-machine state (USMGraphNode_StateMachineStateNode).

Types of Logic Driver K2 nodes that can be spawned into a state's local graph (OnStateBegin / OnStateUpdate / OnStateEnd) or a transition's CanEnterTransition graph. These nodes are bound at edit time to the enclosing state or transition.


enum ELocalGraphWriteNodeType

Enumerator Value Description
CanEvaluate Sets bCanEvaluate on the enclosing transition or conduit. Compatible with transition and conduit graphs only. When false, CanEnterTransition logic is never evaluated and the transition (or conduit) will never be taken.
CanEvaluateFromEvent Sets bCanEvaluateFromEvent on the enclosing transition. Compatible with transition graphs only. When false, the transition is skipped when reached via an auto-bound event.

Types of Logic Driver K2 write nodes that can be spawned into a transition's CanEnterTransition graph or a conduit's bound graph. These nodes are bound at edit time to the enclosing transition or conduit and write a single boolean into the runtime node's state.

TransitionEventReturn is intentionally absent. It is auto-placed as a side effect of binding a transition delegate. Use ConfigureTransitionEvent to bind, rebind, or clear that node.


enum ELocalGraphEventNodeType

Enumerator Value Description
OnInitialized Fires when the enclosing node initializes: for a state, before OnStateBegin and before its transitions initialize; for a transition or conduit, after the source state initializes but before OnStateBegin. Compatible with state, transition, and conduit graphs. Not a singleton.
OnShutdown Fires when the enclosing state, transition, or conduit shuts down. Compatible with state, transition, and conduit graphs. Not a singleton.
OnStateUpdate Fires each time the enclosing state updates and exposes a DeltaSeconds output pin. State graphs only, and never user spawnable. Every state graph is created with one already placed and it cannot be deleted.
OnStateEnd Fires when the enclosing state ends. State graphs only, and never user spawnable. Every state graph is created with one already placed and it cannot be deleted.
OnTransitionEntered Fires when the enclosing transition (or a conduit configured as a transition) is taken. Compatible with transition and conduit graphs. Singleton: rejected if already present.
OnTransitionPreEvaluate Fires before the enclosing transition is evaluated. Transition graphs only. Singleton.
OnTransitionPostEvaluate Fires after the enclosing transition is evaluated. Transition graphs only. Singleton.
OnRootStateMachineStart Fires when the owning blueprint's root state machine starts. For a reference it fires when the reference starts; for a nested state-machine node, only when the top-level machine starts. Compatible with state, transition, conduit, and intermediate graphs. Singleton.
OnRootStateMachineStop Fires when the owning blueprint's root state machine stops. Same compatibility as OnRootStateMachineStart. Singleton.

Types of Logic Driver lifecycle event-entry K2 nodes that can be spawned into a state's local graph or a transition's / conduit's bound graph. Each is an execution entry point that fires at a node lifecycle moment; wire your own K2 logic from its output exec pin. These are the same nodes the right-click "Add Event On ..." menu places, and the same ones a node class auto-adds (wired to its instance function) when assigned. On a graph with no node class the spawnable kinds are absent until spawned here.

OnStateBegin is intentionally absent: its entry node (USMGraphK2Node_StateEntryNode) is the always-present container of every state graph, not an addable event.


enum EReplaceNodeKind

Enumerator Value Description
State A plain state (USMGraphNode_StateNode).
Conduit A conduit (USMGraphNode_ConduitNode).
StateMachine An inline nested state machine (USMGraphNode_StateMachineStateNode).
Reference An empty state-machine reference (USMGraphNode_StateMachineStateNode bound to no asset yet).
Parent A state-machine parent call node (USMGraphNode_StateMachineParentNode).

The node kind ReplaceNode converts a node into. Mirrors the editor's "Replace With" entries.


Public Functions Documentation

function ~ISMGraphGeneration

inline virtual ~ISMGraphGeneration()

function CreateStateNode

virtual USMGraphNode_StateNodeBase * CreateStateNode(
    USMBlueprint * InBlueprint,
    const FCreateStateNodeArgs & InStateArgs
) =0

Create a new state graph node in a blueprint.

Parameters:

InBlueprint
The blueprint to place the node.
InStateArgs
Arguments to use when creating the state.

Return: The newly created state node if successful.


function CreateStateNode

template <typename T >
inline T * CreateStateNode(
    USMBlueprint * InBlueprint,
    const FCreateStateNodeArgs & InStateArgs
)

function CreateTransitionEdge

virtual USMGraphNode_TransitionEdge * CreateTransitionEdge(
    USMBlueprint * InBlueprint,
    const FCreateTransitionEdgeArgs & InTransitionArgs
) =0

Create a new transition between two states.

Parameters:

InBlueprint
The blueprint to place the edge.
InTransitionArgs
Arguments to use to create the transition.

Return: The newly created transition edge if successful.


function CreateTransitionEdge

template <typename T >
inline T * CreateTransitionEdge(
    USMBlueprint * InBlueprint,
    const FCreateTransitionEdgeArgs & InTransitionArgs
)

function CreateTransitionReroute

virtual USMGraphNode_RerouteNode * CreateTransitionReroute(
    USMBlueprint * InBlueprint,
    const FCreateTransitionRerouteArgs & InArgs
) =0

Create a transition reroute node. Reroutes are cosmetic graph nodes that bend a long transition curve around obstructions; they do not participate in runtime evaluation.

Parameters:

InBlueprint
The blueprint to place the reroute in.
InArgs
See FCreateTransitionRerouteArgs.

Return: The created reroute node, or null on failure.


function ConfigureStateMachineReference

virtual bool ConfigureStateMachineReference(
    USMGraphNode_StateMachineStateNode * InRefNode,
    const FConfigureStateMachineReferenceArgs & InArgs
) =0

Reconfigure an existing state-machine-reference state node after creation. Mirrors operations available in the Details panel for a USMGraphNode_StateMachineStateNode: swap the referenced state machine, toggle intermediate-graph use. Only fields that are set in the args are applied; unset fields leave the existing state alone.

Parameters:

InRefNode
The state-machine-reference state node to reconfigure. Must not be null.
InArgs
The configuration to apply.

Return: True if any requested field was honored. False when InRefNode is null, when no fields were set, or when the only requested field was a blueprint swap that was rejected.


function CreateStateStackInstance

virtual USMStateInstance * CreateStateStackInstance(
    USMGraphNode_StateNode * InStateNode,
    const FCreateStateStackArgs & InStateStackArgs
) =0

Create and add a state instance to a state stack.

Parameters:

InStateNode
The state node which should contain the state stack.
InStateStackArgs
The arguments to use when adding the state instance to the stack.

Return: The created state stack instance.


function CreateTransitionStackInstance

virtual USMTransitionInstance * CreateTransitionStackInstance(
    USMGraphNode_TransitionEdge * InTransitionEdge,
    const FCreateTransitionStackArgs & InTransitionStackArgs
) =0

Create and add a transition instance to a transition stack.

Parameters:

InTransitionEdge
The transition edge which should contain the transition stack.
InTransitionStackArgs
The arguments to use when adding the transition instance to the stack.

Return: The created transition stack instance.


function SetNodePropertyValue

virtual bool SetNodePropertyValue(
    USMGraphNode_Base * InGraphNode,
    const FSetNodePropertyArgs & InPropertyArgs,
    FString * OutError =nullptr
) =0

Set the value of a property on a graph node. This can be a state or transition. The property can be public, non-public, or a custom graph property (Such as a TextGraph).

Parameters:

InGraphNode
The graph node containing the property to modify.
InPropertyArgs
The property arguments.
OutError
Optional; when non-null, reset to empty and populated with an actionable message when a SubPath fails to resolve (unknown member, unsplit parent). Deeper mutation failures log only and leave it empty, so callers must keep their own fallback wording.

Return: True if the value was set successfully.


function FindPropertyGraph

virtual bool FindPropertyGraph(
    USMGraphNode_Base * InGraphNode,
    const FFindPropertyGraphArgs & InArgs,
    FFindPropertyGraphResult & OutResult,
    FString * OutError =nullptr
) =0

Resolve a USMPropertyGraph by node + variable + sub-path. The returned graph is the wire-INTO target for general K2 authoring against the property graph. Indexed segments descend through nested-array buckets, switching to each bucket's child graph for subsequent segments; struct-member segments stay on the same graph and step through split sub-pins.

Parameters:

InGraphNode
The graph node owning the property.
InArgs
Resolution arguments. VariableName is required.
OutResult
Populated on success. Untouched on failure.
OutError
Optional; when non-null, populated with an actionable error message on failure and reset to empty on success. Pass nullptr (the default) to discard.

Return: True if the path resolved to a property graph. False on missing variable, unsplit struct parent, out-of-range bucket index, malformed sub-path, or non-bucket array segment that cannot be addressed.


function SetPropertyGraphEditMode

virtual bool SetPropertyGraphEditMode(
    USMPropertyGraph * InGraph,
    bool bInEnable,
    bool bInTransact =true
) =0

Toggle graph-edit mode on a property graph. Required before wiring text graphs durably: USMTextPropertyGraph's compile pipeline only honors wired changes when the graph is in edit mode. Routes through USMPropertyGraph::SetUsingGraphToEdit under a scoped transaction so single-step undo reverts the toggle. In the transacted path the owning Blueprint is conditionally compiled so the property slate node reflects the new mode immediately, matching USMPropertyGraph::ToggleGraphPropertyEdit. The no-transact batch path skips that compile; the caller is responsible for refreshing.

Parameters:

InGraph
The property graph to toggle. Must not be null.
bInEnable
Target edit-mode state.
bInTransact
When true, opens a scoped transaction so the change is undoable. Disable only when the caller already owns a transaction.

Return: True if the toggle was applied. False on null InGraph, or when the underlying variable is read-only (USMPropertyGraph::SetUsingGraphToEdit early-returns in that case; surfacing it lets callers distinguish "applied" from "silently dropped").


function ResetNodePropertyValue

virtual bool ResetNodePropertyValue(
    USMGraphNode_Base * InGraphNode,
    const FResetNodePropertyArgs & InResetArgs
) =0

Reset a property on a graph node to its archetype/CDO default. Mirrors the editor's right-click "Reset Pin to Default Value" entry: if the property is exposed as a graph property, the property graph is reset and the node template's value is restored from the archetype.

Parameters:

InGraphNode
The graph node containing the property to reset.
InResetArgs
The reset arguments.

Return: True if a property graph was reset. False when the property is not exposed as a graph property (nothing to reset on the graph side).


function RemoveNode

virtual bool RemoveNode(
    USMGraphNode_Base * InGraphNode
) =0

Remove a graph node from its owning blueprint, breaking all connected pins.

Parameters:

InGraphNode
The graph node to remove.

Return: True if the node was removed successfully.


function SetInitialState

virtual bool SetInitialState(
    USMGraphNode_StateNodeBase * InStateNode
) =0

Rewire the entry node of a state graph to target a different state. Breaks any existing entry connection before creating the new one.

Parameters:

InStateNode
The state node to wire as the initial state. Must live in a USMGraph.

Return: True if the entry wiring was updated successfully.


function GetRootStateMachineGraph

virtual USMGraph * GetRootStateMachineGraph(
    USMBlueprint * InBlueprint
) const =0

Resolve the root state machine graph of a state-machine Blueprint: the top-level USMGraph that owns the entry node and every root-level state, transition, and nested state machine.

Parameters:

InBlueprint
The state-machine Blueprint to query.

Return: The root USMGraph, or null when InBlueprint is null or has no root state machine graph.


function CreateLocalGraphReadNode

virtual UEdGraphNode * CreateLocalGraphReadNode(
    USMBlueprint * InBlueprint,
    const FCreateLocalGraphReadNodeArgs & InArgs
) =0

Spawn a Logic Driver local-graph-read K2 node into a state or transition's local graph. The returned node is the generic UEdGraphNode supertype; the concrete USMGraphK2Node_* subclass is implementation-private.

Parameters:

InBlueprint
The owning state-machine blueprint. The target graph must belong to it.
InArgs
Spawn arguments. TargetGraph is required.

Return: The newly spawned node, or null on failure (null TargetGraph, or NodeType not compatible with the supplied graph).


function CreateLocalGraphWriteNode

virtual UEdGraphNode * CreateLocalGraphWriteNode(
    USMBlueprint * InBlueprint,
    const FCreateLocalGraphWriteNodeArgs & InArgs
) =0

Spawn a Logic Driver local-graph-write K2 node into a transition or conduit's local graph.

Parameters:

InBlueprint
The owning state-machine blueprint. The target graph must belong to it.
InArgs
Spawn arguments. TargetGraph is required.

Return: The newly spawned node, or null on failure (null TargetGraph, or NodeType not compatible with the supplied graph).


function CreateLocalGraphEventNode

virtual UEdGraphNode * CreateLocalGraphEventNode(
    USMBlueprint * InBlueprint,
    const FCreateLocalGraphEventNodeArgs & InArgs
) =0

Spawn a Logic Driver lifecycle event-entry K2 node into a state, transition, or conduit's local graph. The node is an execution entry point whose output exec pin drives caller-authored K2 logic; it is bound at edit time to the enclosing node and resolved to the runtime node at compile. Equivalent to the editor's right-click "Add Event On ..." menu. Engine create_node does not expose these nodes, which is why this path exists.

Parameters:

InBlueprint
The owning state-machine blueprint. The target graph must belong to it.
InArgs
Spawn arguments. TargetGraph is required.

Return: The newly spawned node, or null on failure (null TargetGraph, NodeType not compatible with the supplied graph, or a singleton kind already present).


function GetCompatibleLocalGraphNodeTypes

virtual void GetCompatibleLocalGraphNodeTypes(
    const UEdGraph * InTargetGraph,
    TArray< ELocalGraphReadNodeType > & OutReadTypes,
    TArray< ELocalGraphWriteNodeType > & OutWriteTypes
) const =0

Enumerate the Logic Driver K2 read/write node kinds that are compatible with a bound graph, without spawning anything. A kind is reported when its concrete USMGraphK2Node subclass accepts InTargetGraph via IsCompatibleWithGraph. Pairs with CreateLocalGraphReadNode / CreateLocalGraphWriteNode: enumerate the valid kinds for a graph, then spawn one.

Lifecycle event-entry kinds are enumerated separately by GetCompatibleLocalGraphEventNodeTypes.

Parameters:

InTargetGraph
The bound graph to test (state, transition, conduit, or intermediate graph). Null clears both outputs and returns.
OutReadTypes
Reset then populated with the compatible read kinds.
OutWriteTypes
Reset then populated with the compatible write kinds.

function GetCompatibleLocalGraphEventNodeTypes

virtual void GetCompatibleLocalGraphEventNodeTypes(
    const UEdGraph * InTargetGraph,
    TArray< ELocalGraphEventNodeType > & OutEventTypes
) const =0

Enumerate the Logic Driver lifecycle event-entry node kinds that are compatible with a bound graph, without spawning anything. A kind is reported when its concrete USMGraphK2Node subclass accepts InTargetGraph via IsCompatibleWithGraph, which also filters singleton kinds that are already present. Pairs with CreateLocalGraphEventNode. The event-entry companion to GetCompatibleLocalGraphNodeTypes.

Parameters:

InTargetGraph
The bound graph to test (state, transition, or conduit graph). Null clears the output and returns.
OutEventTypes
Reset then populated with the compatible event-entry kinds.

function ConfigureTransitionEvent

virtual bool ConfigureTransitionEvent(
    USMGraphNode_TransitionEdge * InTransitionEdge,
    const FConfigureTransitionEventArgs & InArgs
) =0

Reconfigure a transition edge's event-binding fields and trigger flags. Mirrors operations available in the Details panel for a USMGraphNode_TransitionEdge: bind a delegate, rebind to a different delegate, clear the binding, or update event trigger flags. Only fields set in the args are applied.

Field application order: DelegateOwnerInstance, DelegateOwnerClass, DelegatePropertyName, bEventTriggersTargetedUpdate, bEventTriggersFullUpdate. Cascading resets from the transition's PostEditChangeProperty mean an owner change earlier in the order will clear name/class fields before a later field write restores them.

Parameters:

InTransitionEdge
The transition edge to reconfigure. Must not be null.
InArgs
The configuration to apply.

Return: True if any requested field was applied. False when InTransitionEdge is null or no fields were set.


function CreateNodeClassVariable

virtual bool CreateNodeClassVariable(
    UBlueprint * InNodeClassBP,
    const FCreateNodeClassVariableArgs & InArgs
) =0

Create a new Blueprint variable on a node-class Blueprint and optionally stamp its direction, hidden, and read-only flags via the same path SMVariableCustomization uses. Refuses USMTransitionInstance BPs when any SM-config field is set (matches the editor filter); a plain variable add (no Direction / bHidden / bReadOnly) is allowed on transition BPs.

Compile behavior: when any of Direction / bHidden / bReadOnly is set, the blueprint is compiled in-call so the FProperty materializes on the GeneratedClass and the override can be stamped on the CDO. When all three are unset (plain variable add), the blueprint is NOT compiled. Batch many adds and compile once at the end for best performance.

Parameters:

InNodeClassBP
The node-class Blueprint to modify. Must derive from USMNodeInstance.
InArgs
See FCreateNodeClassVariableArgs.

Return: True if the variable was created (and overrides applied when requested). False on null BP, non-USMNodeInstance parent, transition-class BP with any SM-config field set, duplicate variable name, or unsupported variable type.


function ConfigureNodeClassVariable

virtual bool ConfigureNodeClassVariable(
    UBlueprint * InNodeClassBP,
    const FConfigureNodeClassVariableArgs & InArgs
) =0

Reconfigure an existing node-class variable's direction, hidden, or read-only flags. The variable must already exist on the node-class BP's NewVariables. Refuses USMTransitionInstance BPs to match the editor filter.

Parameters:

InNodeClassBP
The node-class Blueprint to modify.
InArgs
See FConfigureNodeClassVariableArgs.

Return: True if any field was applied. False on null BP, transition-class BP, unknown variable name, or no fields set in InArgs.


function ConnectNodeVariableOutput

virtual bool ConnectNodeVariableOutput(
    USMBlueprint * InBlueprint,
    const FConnectNodeVariableOutputArgs & InArgs
) =0

Wire a node-class output variable to either another node's input variable (within the same FSM) or a variable on the owning FSM Blueprint. Spawns the matching IO reader/writer node inside the relevant property sub-graph and links pins, identical to what a user does by opening the property graph and dragging.

Preconditions (failure logged + returns false):

  • FromOutputVariable.VariableName must have the Output flag set on its addressed template.
  • ToInputVariable.VariableName (if set) must have the Input flag set on its addressed template.
  • Exactly one of ToInputVariable / ToOwningBlueprintVariable must be set.
  • Source and destination state nodes must live in the supplied InBlueprint.
  • When ToOwningBlueprintVariable is set, the named variable must exist on InBlueprint.
  • Pin types must be compatible (caught by the schema's TryCreateConnection).

Idempotent: if the requested connection already exists, returns true without spawning duplicate IO nodes.

Parameters:

InBlueprint
The state-machine Blueprint containing both endpoints. Must not be null.
InArgs
Wiring arguments.

Return: True if the wire was established (or was already present).


function DisconnectNodeVariableOutput

virtual bool DisconnectNodeVariableOutput(
    USMBlueprint * InBlueprint,
    const FConnectNodeVariableOutputArgs & InArgs
) =0

Break a previously-established output->input or output->owner wire. Clears the writer-node pin selection that targets the requested destination, severing the data path. The spawned writer/reader UEdGraphNode is NOT deleted; it stays in the property sub-graph with that pin cleared. Other wires from the same source output to other destinations are left untouched.

Idempotent: if no matching wire is present (the variable was never wired, or already disconnected, or the FSM Blueprint never had the named owning-BP variable) the call returns false without logging – callers can use this as a tolerant "ensure not connected" primitive.

Return: True if a matching wire was found and broken. False if the requested wire was not present.


function CollapseNodesToStateMachine

virtual USMGraphNode_StateMachineStateNode * CollapseNodesToStateMachine(
    const FCollapseNodesToStateMachineArgs & InArgs,
    FString * OutError =nullptr
) =0

Collapse a set of nodes into a new nested state machine node, mirroring the editor's "Collapse to State Machine". Transitions crossing the selection boundary are rewired onto the new container. Interior nodes and edges are moved into its bound graph, and the entry wiring is preserved.

Parameters:

InArgs
Collapse arguments. Nodes must contain at least one state node, all in one graph.
OutError
Optional. Populated with an actionable message on failure and reset on success.

Return: The new container state-machine node, or null on failure (empty set, no state node, cross-graph set, or the owning graph disallows nested state machines).


function MergeStates

virtual bool MergeStates(
    const FMergeStatesArgs & InArgs,
    FMergeStatesResult & OutResult,
    FString * OutError =nullptr
) =0

Merge source states' node-class templates into a destination state's stack, mirroring the editor's "Cut and Merge States" (bDestroyStates=true) / "Copy and Merge States" (bDestroyStates=false). The owning Blueprint is recompiled internally. New stack templates are minted with fresh guids. The cut variant also destroys the sources and rewires their transitions.

Parameters:

InArgs
Merge arguments. DestinationState and SourceStates are required.
OutResult
Populated on success with the minted stack-template guids. Untouched on failure.
OutError
Optional. Populated with an actionable message on failure and reset on success.

Return: True on success. False on null destination, empty/invalid sources, a source equal to the destination, or a cross-graph source.


function ReplaceNode

virtual USMGraphNode_Base * ReplaceNode(
    const FReplaceNodeArgs & InArgs,
    FString * OutError =nullptr
) =0

Replace a node in place with a different kind, mirroring the editor's "Replace With ..." entries. Existing transitions are preserved and the original node is removed. The set of valid target kinds for a given node matches the editor's right-click availability.

Parameters:

InArgs
Replace arguments. Node is required. TargetKind selects the new kind.
OutError
Optional. Populated with an actionable message on failure and reset on success.

Return: The new node, or null on failure (null node, or the node cannot be replaced with the requested kind).


function ConvertStateMachineToReference

virtual USMBlueprint * ConvertStateMachineToReference(
    const FConvertStateMachineToReferenceArgs & InArgs,
    FString * OutError =nullptr
) =0

Convert an inline nested state-machine node into a reusable state-machine-reference asset, mirroring the editor's "Convert to State Machine Reference". A new Blueprint is minted to hold the extracted graph (headless: no modal dialog), the node is rebound as a reference to it, and the original inline graph is emptied. The node keeps its guid. The minted asset is registered with the asset registry (SMSearch reindexes automatically).

Parameters:

InArgs
Conversion arguments. StateMachineNode is required.
OutError
Optional. Populated with an actionable message on failure and reset on success. Pass nullptr (the default) to discard.

Return: The newly minted reference Blueprint, or null on failure (null node, node already a reference, owning graph disallows references, or asset minting failed).