Skip to content

USMNodeInstance

Module: SMSystem

#include <SMNodeInstance.h>

Inherits from UObject, ISMInstanceInterface

Inherited by USMStateInstance_Base, USMTransitionInstance

Description

class USMNodeInstance;

[Logic Driver] The abstract base node class all state machine nodes derive from.

Public Functions

Name
USMNodeInstance()
virtual void Serialize(FArchive & Ar) override
virtual UWorld * GetWorld() const override
virtual void BeginDestroy() override
virtual UObject * GetContext() const override
images/classes/SMNodeInstance/img/nd_img_GetContext.png
virtual void NativeInitialize()
virtual void NativeShutdown()
void OnRootStateMachineStart()
images/classes/SMNodeInstance/img/nd_img_OnRootStateMachineStart.png
void OnRootStateMachineStop()
images/classes/SMNodeInstance/img/nd_img_OnRootStateMachineStop.png
void RunConstructionScript()
bool ShouldSkipNativeEditorConstructionScripts() const
USMInstance * GetStateMachineInstance(bool bTopMostInstance =false) const
images/classes/SMNodeInstance/img/nd_img_GetStateMachineInstance.png
void SetOwningNode(FSMNode_Base * Node, bool bInIsEditorExecution =false)
const FSMNode_Base * GetOwningNode() const
template \<typename T >
T *
GetOwningNodeAs() const
virtual const FSMNode_Base * GetOwningNodeContainer() const
USMStateMachineInstance * GetOwningStateMachineNodeInstance() const
images/classes/SMNodeInstance/img/nd_img_GetOwningStateMachineNodeInstance.png
TScriptInterface< ISMStateMachineNetworkedInterface > GetNetworkInterface() const
images/classes/SMNodeInstance/img/nd_img_GetNetworkInterface.png
virtual float GetTimeInState() const
images/classes/SMNodeInstance/img/nd_img_GetTimeInState.png
virtual bool IsInEndState() const
virtual bool HasUpdated() const
images/classes/SMNodeInstance/img/nd_img_HasUpdated.png
bool IsActive() const
images/classes/SMNodeInstance/img/nd_img_IsActive.png
const FString & GetNodeName() const
images/classes/SMNodeInstance/img/nd_img_GetNodeName.png
const FGuid & GetGuid() const
images/classes/SMNodeInstance/img/nd_img_GetGuid.png
UTexture2D * GetNodeIcon() const
images/classes/SMNodeInstance/img/nd_img_GetNodeIcon.png
FVector2D GetNodeIconSize() const
images/classes/SMNodeInstance/img/nd_img_GetNodeIconSize.png
FLinearColor GetNodeIconTintColor() const
images/classes/SMNodeInstance/img/nd_img_GetNodeIconTintColor.png
void EvaluateGraphProperties(bool bTargetOnly =false)
images/classes/SMNodeInstance/img/nd_img_EvaluateGraphProperties.png
const FGuid & GetTemplateGuid() const
const FVector2D & GetNodePosition() const
images/classes/SMNodeInstance/img/nd_img_GetNodePosition.png
bool IsInitialized() const
images/classes/SMNodeInstance/img/nd_img_IsInitialized.png
bool IsInitializedAndReadyForInputEvents() const
FSMGraphProperty * FindExposedPropertyOverrideByName(const FName & VariableName) const
virtual void PostEditChangeProperty(FPropertyChangedEvent & PropertyChangedEvent) override
bool WasArrayPropertyModified(const FName & PropertyName) const
bool IsNodePinChanging() const
void SetDisplayName(FName NewDisplayName)
images/classes/SMNodeInstance/img/nd_img_SetDisplayName.png
void SetNodeDescriptionText(FText NewDescription)
images/classes/SMNodeInstance/img/nd_img_SetNodeDescriptionText.png
FText GetNodeDescriptionText() const
images/classes/SMNodeInstance/img/nd_img_GetNodeDescriptionText.png
void SetNodeColor(FLinearColor NewColor)
images/classes/SMNodeInstance/img/nd_img_SetNodeColor.png
void SetUseCustomColor(bool bValue)
images/classes/SMNodeInstance/img/nd_img_SetUseCustomColor.png
void SetUseCustomIcon(bool bValue)
images/classes/SMNodeInstance/img/nd_img_SetUseCustomIcon.png
void SetVariableReadOnly(FName VariableName, bool bSetIsReadOnly)
images/classes/SMNodeInstance/img/nd_img_SetVariableReadOnly.png
void SetVariableHidden(FName VariableName, bool bSetHidden)
images/classes/SMNodeInstance/img/nd_img_SetVariableHidden.png
bool IsEditorExecution() const
images/classes/SMNodeInstance/img/nd_img_IsEditorExecution.png
void WithExecutionEnvironment(ESMExecutionEnvironment & ExecutionEnvironment)
images/classes/SMNodeInstance/img/nd_img_WithExecutionEnvironment.png
TScriptInterface< ISMEditorGraphNodeInterface > GetOwningEditorGraphNode() const
images/classes/SMNodeInstance/img/nd_img_GetOwningEditorGraphNode.png
void K2_TryGetOwningEditorGraphNode(TScriptInterface< ISMEditorGraphNodeInterface > & EditorNode, ESMValidEditorNode & IsValidNode) const
images/classes/SMNodeInstance/img/nd_img_K2_TryGetOwningEditorGraphNode.png
bool IsInitializationThreadSafe() const
void ResetVariables()
images/classes/SMNodeInstance/img/nd_img_ResetVariables.png
bool GetResetVariablesOnInitialize() const
bool HasCustomColor() const
const FLinearColor & GetNodeColor() const
const FSMNodeDescription & GetNodeDescription() const
bool HasCustomIcon() const
FString GetNodeDisplayName() const
void SetTemplateGuid(const FGuid & NewTemplateGuid)
void SetIsThreadSafe(bool bNewValue)
void SetIsEditorThreadSafe(const bool bNewValue)
bool GetIsEditorThreadSafe() const
TEnumAsByte< ESMNodeInput::Type > GetInputType() const
int32 GetInputPriority() const
bool GetBlockInput() const
UInputComponent * GetInputComponent() const
images/classes/SMNodeInstance/img/nd_img_GetInputComponent.png
FName GetConstructionScriptFunctionName()
FName GetNodeDescriptionPropertyName()
FName GetHideFromDropDownIfRulesFailPropertyName()

Protected Functions

Name
virtual void OnRootStateMachineStart_Implementation()
virtual void OnRootStateMachineStop_Implementation()
void ConstructionScript()
images/classes/SMNodeInstance/img/nd_img_ConstructionScript.png
FSMGraphProperty * FindOrAddExposedPropertyOverrideByName(const FName & VariableName)
void OnPreCompileValidate(USMCompilerLog * CompilerLog) const
virtual void OnPreCompileValidate_Implementation(USMCompilerLog * CompilerLog) const
virtual void ConstructionScript_Implementation()
virtual UTexture2D * GetNodeIcon_Implementation() const
virtual FVector2D GetNodeIconSize_Implementation() const
virtual FLinearColor GetNodeIconTintColor_Implementation() const
void EnableInput()
Input.
void DisableInput()
void OnContextPawnControllerChanged(APawn * Pawn, AController * NewController)

Public Attributes

Name
TArray< FSMGraphProperty > ExposedPropertyOverrides
uint8 bEvalDefaultProperties
uint8 bAutoEvalExposedProperties

Protected Attributes

Name
bool bSkipNativeEditorConstructionScripts
TObjectPtr< UTexture2D > NodeIcon
FVector2D NodeIconSize
FLinearColor NodeIconTintColor
bool bResetVariablesOnInitialize
FSMNodeDescription NodeDescription
FLinearColor NodeColor
uint8 bDisplayCustomIcon
uint8 bUseCustomColors
uint8 bHideFromDropDownIfRulesFail
TObjectPtr< UInputComponent > InputComponent
TEnumAsByte< ESMNodeInput::Type > AutoReceiveInput
int32 InputPriority
uint8 bBlockInput

Friends

Name
class USMGraphNode_StateNode
class USMGraphNode_TransitionEdge
struct FSMNode_Base(FSMNode_Base )
class USMGraphNode_Base
class USMGraphK2Node_PropertyNode_Base

Public Functions Documentation

function USMNodeInstance

USMNodeInstance()

function Serialize

virtual void Serialize(
    FArchive & Ar
) override

function GetWorld

virtual UWorld * GetWorld() const override

function BeginDestroy

virtual void BeginDestroy() override

function GetContext

virtual UObject * GetContext() const override

images/classes/SMNodeInstance/img/nd_img_GetContext.png

The object which this node is running for. Determined by the owning state machine.


function NativeInitialize

virtual void NativeInitialize()

Perform native initialization. Called before On[Node]Initialized for all node types.


function NativeShutdown

virtual void NativeShutdown()

Perform native cleanup. Called after On[Node]Shutdown for all node types.


function OnRootStateMachineStart

void OnRootStateMachineStart()

images/classes/SMNodeInstance/img/nd_img_OnRootStateMachineStart.png

Called when the immediate owning state machine blueprint is starting. If this is part of a reference then it will be called when the reference starts. If this is for a state machine node then it will only be called when the top level state machine starts.


function OnRootStateMachineStop

void OnRootStateMachineStop()

images/classes/SMNodeInstance/img/nd_img_OnRootStateMachineStop.png

Called when the immediate owning state machine blueprint is stopping. If this is part of a reference then it will be called when the reference stops. If this is for a state machine node then it will only be called when the top level state machine stops.


function RunConstructionScript

void RunConstructionScript()

Signal the construction script should start.


function ShouldSkipNativeEditorConstructionScripts

inline bool ShouldSkipNativeEditorConstructionScripts() const

Checks for user override on native classes if editor construction scripts should be skipped.


function GetStateMachineInstance

USMInstance * GetStateMachineInstance(
    bool bTopMostInstance =false
) const

images/classes/SMNodeInstance/img/nd_img_GetStateMachineInstance.png

Retrieve an owning blueprint state machine.

Parameters:

bTopMostInstance
If the state machine is a reference return the top most instance.

Return: The state machine instance this node is running for.

Warning:

This call is unavailable during editor construction scripts because the USMInstance class is in the process of being regenerated.


function SetOwningNode

void SetOwningNode(
    FSMNode_Base * Node,
    bool bInIsEditorExecution =false
)

Set during initialization of the state machine.


function GetOwningNode

inline const FSMNode_Base * GetOwningNode() const

Reference to the owning node within a state machine.


function GetOwningNodeAs

template <typename T >
inline T * GetOwningNodeAs() const

Reference the owning struct node as a given type.


function GetOwningNodeContainer

inline virtual const FSMNode_Base * GetOwningNodeContainer() const

Some nodes such as references may have special handling for returning a container node.

Reimplemented by: USMStateMachineInstance::GetOwningNodeContainer


function GetOwningStateMachineNodeInstance

USMStateMachineInstance * GetOwningStateMachineNodeInstance() const

images/classes/SMNodeInstance/img/nd_img_GetOwningStateMachineNodeInstance.png

The instance of the direct state machine node this node is part of. Every node except the root state machine has an owning state machine node.


function GetNetworkInterface

TScriptInterface< ISMStateMachineNetworkedInterface > GetNetworkInterface() const

images/classes/SMNodeInstance/img/nd_img_GetNetworkInterface.png

Return the server interface if there is one. This may be null.


function GetTimeInState

virtual float GetTimeInState() const

images/classes/SMNodeInstance/img/nd_img_GetTimeInState.png

The current time spent in the state.


function IsInEndState

virtual bool IsInEndState() const

Legacy method available to all node types determining if the state machine node is in an end state or a state node is an end state.

When called from state machine nodes it checks if the state machine is in an end state. When called from other state types it is equivalent to calling USMStateInstance_Base::IsEndState() on the state. When called from transitions it is equivalent to calling IsInEndState() on the previous state.

Note:

Overloading this method has no effect on whether a state is considered an end state or not. This method is not used internally in the plugin and only meant for observers.

Reimplemented by: USMStateInstance_Base::IsInEndState


function HasUpdated

virtual bool HasUpdated() const

images/classes/SMNodeInstance/img/nd_img_HasUpdated.png

State has updated at least once.


function IsActive

bool IsActive() const

images/classes/SMNodeInstance/img/nd_img_IsActive.png

If this node is active.


function GetNodeName

const FString & GetNodeName() const

images/classes/SMNodeInstance/img/nd_img_GetNodeName.png

Retrieve the node name.


function GetGuid

const FGuid & GetGuid() const

images/classes/SMNodeInstance/img/nd_img_GetGuid.png

Unique identifier taking into account qualified path. Unique across blueprints if called after Instance initialization.


function GetNodeIcon

UTexture2D * GetNodeIcon() const

images/classes/SMNodeInstance/img/nd_img_GetNodeIcon.png

Retrieve the icon representing this node. Null by default.


function GetNodeIconSize

FVector2D GetNodeIconSize() const

images/classes/SMNodeInstance/img/nd_img_GetNodeIconSize.png

Retrieve the size to use when displaying the icon. Leave 0,0 to auto size.


function GetNodeIconTintColor

FLinearColor GetNodeIconTintColor() const

images/classes/SMNodeInstance/img/nd_img_GetNodeIconTintColor.png

Retrieve the tint to use when displaying the icon.


function EvaluateGraphProperties

void EvaluateGraphProperties(
    bool bTargetOnly =false
)

images/classes/SMNodeInstance/img/nd_img_EvaluateGraphProperties.png

Evaluate graphs of properties exposed directly on this node.

Parameters:

bTargetOnly
Only evaluate graph properties for the target node instance (such as a self target). Useful for only evaluating properties of select state stack instances.

function GetTemplateGuid

inline const FGuid & GetTemplateGuid() const

Retrieve the template guid. The template guid cannot be modified at runtime.


function GetNodePosition

const FVector2D & GetNodePosition() const

images/classes/SMNodeInstance/img/nd_img_GetNodePosition.png

Retrieve the node position in the graph.


function IsInitialized

inline bool IsInitialized() const

images/classes/SMNodeInstance/img/nd_img_IsInitialized.png

True after the initialize sequence is called on this node and false after shutdown is called.


function IsInitializedAndReadyForInputEvents

bool IsInitializedAndReadyForInputEvents() const

Helper for checking if the node is ready to respond to input events.


function FindExposedPropertyOverrideByName

FSMGraphProperty * FindExposedPropertyOverrideByName(
    const FName & VariableName
) const

Searches the ExposedPropertyOverrides to find a property by name. O(n).


function PostEditChangeProperty

virtual void PostEditChangeProperty(
    FPropertyChangedEvent & PropertyChangedEvent
) override

function WasArrayPropertyModified

bool WasArrayPropertyModified(
    const FName & PropertyName
) const

True if an array property was added or removed through the details panel.


function IsNodePinChanging

bool IsNodePinChanging() const

This is true only if a user has manually changed a pin value on an exposed variable, and only during PostEditChangeProperty.


function SetDisplayName

void SetDisplayName(
    FName NewDisplayName
)

images/classes/SMNodeInstance/img/nd_img_SetDisplayName.png

Sets the display name of the node. Valid from editor construction scripts only. bShowDisplayNameOnly must be set to true for the display name to be visible.

Development Only!


function SetNodeDescriptionText

void SetNodeDescriptionText(
    FText NewDescription
)

images/classes/SMNodeInstance/img/nd_img_SetNodeDescriptionText.png

Sets the text description of the node. This generally only impacts the tooltip in the state machine graph. Valid from editor construction scripts only.

Development Only!


function GetNodeDescriptionText

FText GetNodeDescriptionText() const

images/classes/SMNodeInstance/img/nd_img_GetNodeDescriptionText.png

The text description of the node. Either returns the instance NodeDescription.Description or class metadata.

Development only!

Return: The text description in the editor.


function SetNodeColor

void SetNodeColor(
    FLinearColor NewColor
)

images/classes/SMNodeInstance/img/nd_img_SetNodeColor.png

Sets the color of the node. Requires UseCustomColor set to true. Valid from editor construction scripts only.

Development Only!


function SetUseCustomColor

void SetUseCustomColor(
    bool bValue
)

images/classes/SMNodeInstance/img/nd_img_SetUseCustomColor.png

Tells the node to use a custom color. Valid from editor construction scripts only.

Development Only!


function SetUseCustomIcon

void SetUseCustomIcon(
    bool bValue
)

images/classes/SMNodeInstance/img/nd_img_SetUseCustomIcon.png

Tells the node to use a custom icon. Valid from editor construction scripts only. Override the GetNodeIcon function to dynamically set the icon.

Development Only!


function SetVariableReadOnly

void SetVariableReadOnly(
    FName VariableName,
    bool bSetIsReadOnly
)

images/classes/SMNodeInstance/img/nd_img_SetVariableReadOnly.png

Sets the read only status of an exposed variable. Valid from editor construction scripts only.

Development Only!

Parameters:

VariableName
The name of the exposed variable as defined in this node class.
bSetIsReadOnly
Set the variable read only status.

function SetVariableHidden

void SetVariableHidden(
    FName VariableName,
    bool bSetHidden
)

images/classes/SMNodeInstance/img/nd_img_SetVariableHidden.png

Sets the hidden status of an exposed variable. Valid from editor construction scripts only.

Development Only!

Parameters:

VariableName
The name of the exposed variable as defined in this node class.
bSetHidden
Set the variable hidden status.

function IsEditorExecution

bool IsEditorExecution() const

images/classes/SMNodeInstance/img/nd_img_IsEditorExecution.png

Checks if this node is running for an editor state machine. This is generally only valid during editor time construction scripts. Use this to allow the construction script to set default values during compile instead of recalculating values during run-time.


function WithExecutionEnvironment

void WithExecutionEnvironment(
    ESMExecutionEnvironment & ExecutionEnvironment
)

images/classes/SMNodeInstance/img/nd_img_WithExecutionEnvironment.png

Determine if this node is running for editor construction scripts or for a game.


function GetOwningEditorGraphNode

TScriptInterface< ISMEditorGraphNodeInterface > GetOwningEditorGraphNode() const

images/classes/SMNodeInstance/img/nd_img_GetOwningEditorGraphNode.png

Return the UEdGraphNode owning this node instance template. This is only valid in the editor while designing state machines. If valid this means you are editing the node in the state machine at editor time.

This can be used in editor construction scripts or editor only methods like PostEditChangeProperty.


function K2_TryGetOwningEditorGraphNode

void K2_TryGetOwningEditorGraphNode(
    TScriptInterface< ISMEditorGraphNodeInterface > & EditorNode,
    ESMValidEditorNode & IsValidNode
) const

images/classes/SMNodeInstance/img/nd_img_K2_TryGetOwningEditorGraphNode.png

Return the UEdGraphNode owning this node instance template. This is only valid in the editor while designing state machines. If valid this means you are editing the node in the state machine graph at editor time.

This can be used in editor construction scripts.

Parameters:

EditorNode
The UEdGraphNode containing this node instance template.
IsValidNode
The execution path to take if the UEdGraph node is valid or not.

function IsInitializationThreadSafe

bool IsInitializationThreadSafe() const

If this node can be created on a new thread.


function ResetVariables

void ResetVariables()

images/classes/SMNodeInstance/img/nd_img_ResetVariables.png

Resets all properties back to their defaults. Exposed graph properties will also be reset and may need to be re-evaluated.


function GetResetVariablesOnInitialize

inline bool GetResetVariablesOnInitialize() const

function HasCustomColor

inline bool HasCustomColor() const

function GetNodeColor

inline const FLinearColor & GetNodeColor() const

function GetNodeDescription

inline const FSMNodeDescription & GetNodeDescription() const

function HasCustomIcon

inline bool HasCustomIcon() const

function GetNodeDisplayName

FString GetNodeDisplayName() const

The default name which should be used.


function SetTemplateGuid

inline void SetTemplateGuid(
    const FGuid & NewTemplateGuid
)

Sets the template guid. Editor use only.


function SetIsThreadSafe

inline void SetIsThreadSafe(
    bool bNewValue
)

function SetIsEditorThreadSafe

inline void SetIsEditorThreadSafe(
    const bool bNewValue
)

function GetIsEditorThreadSafe

inline bool GetIsEditorThreadSafe() const

function GetInputType

inline TEnumAsByte< ESMNodeInput::Type > GetInputType() const

function GetInputPriority

inline int32 GetInputPriority() const

function GetBlockInput

inline bool GetBlockInput() const

function GetInputComponent

inline UInputComponent * GetInputComponent() const

images/classes/SMNodeInstance/img/nd_img_GetInputComponent.png

Retrieve the input component this node created with AutoReceiveInput. The input component will only be valid if AutoReceiveInput is not disabled and this node is initialized.

Return: The UInputComponent or nullptr.


function GetConstructionScriptFunctionName

static inline FName GetConstructionScriptFunctionName()

The name of the protected ConstructionScript function.


function GetNodeDescriptionPropertyName

static inline FName GetNodeDescriptionPropertyName()

function GetHideFromDropDownIfRulesFailPropertyName

static inline FName GetHideFromDropDownIfRulesFailPropertyName()

Protected Functions Documentation

function OnRootStateMachineStart_Implementation

inline virtual void OnRootStateMachineStart_Implementation()

function OnRootStateMachineStop_Implementation

inline virtual void OnRootStateMachineStop_Implementation()

function ConstructionScript

void ConstructionScript()

images/classes/SMNodeInstance/img/nd_img_ConstructionScript.png

A construction script that runs in the editor when the blueprint is modified. During run-time it will run after all nodes have instantiated.

When running with Editor Execution, only default values entered into public properties from the state machine graph will be available. Connecting a variable to a public property within the state machine graph will not evaluate until run-time. Additionally, the owning SMInstance will not be available at editor time since that is the class being compiled.

If construction scripts aren't working in the editor, you may need to adjust your settings to Standard.

To configure editor construction script settings, go under Project Settings -> Logic Driver -> Editor Node Construction Script Setting.

Warning:

Any values set here while running with editor execution will replace the instance default values in state machine graphs when that state machine is compiled.


function FindOrAddExposedPropertyOverrideByName

FSMGraphProperty * FindOrAddExposedPropertyOverrideByName(
    const FName & VariableName
)

Return an existing override or adds a new one. O(n).


function OnPreCompileValidate

void OnPreCompileValidate(
    USMCompilerLog * CompilerLog
) const

Validate the node instance at state machine compile time. Use the CompilerLog->Log() function to output messages and report errors.

Called by the kismet compiler prior to compilation.

Parameters:

CompilerLog
The compiler log specific to this compiler context. Write messages with Log().

function OnPreCompileValidate_Implementation

inline virtual void OnPreCompileValidate_Implementation(
    USMCompilerLog * CompilerLog
) const

function ConstructionScript_Implementation

inline virtual void ConstructionScript_Implementation()

function GetNodeIcon_Implementation

virtual UTexture2D * GetNodeIcon_Implementation() const

function GetNodeIconSize_Implementation

virtual FVector2D GetNodeIconSize_Implementation() const

function GetNodeIconTintColor_Implementation

virtual FLinearColor GetNodeIconTintColor_Implementation() const

function EnableInput

void EnableInput()

Input.

Allow input bindings if the owning state machine supports them.


function DisableInput

void DisableInput()

Disable input bindings.


function OnContextPawnControllerChanged

void OnContextPawnControllerChanged(
    APawn * Pawn,
    AController * NewController
)

Public Attributes Documentation

variable ExposedPropertyOverrides

TArray< FSMGraphProperty > ExposedPropertyOverrides;

Customize how exposed graph properties are displayed on the node.

Match the variable name with the variable you want to override. Property must be instance editable.

These values can be edited directly on the variable's details panel in the blueprint editor. Elements will be added automatically in this case.

This exact property is only visible in the class defaults if the Project Editor setting bEnableVariableCustomization is false.

If this needs to be programatically modified, it should be done so through the editor module's FSMNodeInstanceUtils ExposedPropertyOverride methods.

Warning:

This array and all elements are not safe to modify through C++ unless done so in the C++ constructor or by property handles. Otherwise changes may not be propagated to instances in graphs.


variable bEvalDefaultProperties

uint8 bEvalDefaultProperties;

Should graph properties evaluate even if they only contain default values. This includes properties that have values directly entered into a node without any blueprint expressions connected, such as typing a value into a string field.

When false default values entered into an exposed property won't ever evaluate and the value at compile time will be used until modified at run-time. If any blueprint pins are connected to the property then this setting doesn't apply.

Setting this to off is an optimization and may improve performance. However, if you modify the value at run-time it will no longer reset (re-evaluate) to the default value On State Begin. This is on by default for backwards compatibility and to maintain consistent behavior with variable evaluation.


variable bAutoEvalExposedProperties

uint8 bAutoEvalExposedProperties;

Properties marked as public will be exposed on this node as a graph.

When this is true that graph will automatically evaluate on state entry. When this is false you should manually call EvaluateGraphProperties().

Graph properties are only valid for nodes deriving from USMStateInstance_Base.


Protected Attributes Documentation

variable bSkipNativeEditorConstructionScripts

bool bSkipNativeEditorConstructionScripts;

Tell the state machine compiler to skip editor construction scripts for this native class.

This is primarily an optimization to improve performance when construction scripts aren't used on native classes. For blueprint classes the state machine compiler can easily check if there is logic defined, but not for native classes.

Children class may override this behavior, and blueprint children will override if there is any construction script logic defined.


variable NodeIcon

TObjectPtr< UTexture2D > NodeIcon;

The icon to use when displaying this node. This exists in run-time as well in case this image is needed for purposes outside of editor use.


variable NodeIconSize

FVector2D NodeIconSize;

The size of the node icon. Leave 0,0 to auto size.


variable NodeIconTintColor

FLinearColor NodeIconTintColor;

The tint color to apply to the node icon.


variable bResetVariablesOnInitialize

bool bResetVariablesOnInitialize;

Resets all properties back to their default values when the node is initialized.


variable NodeDescription

FSMNodeDescription NodeDescription;

Describe the node. This provides information to the context menu and to tooltips.


variable NodeColor

FLinearColor NodeColor;

The standard color for this node.


variable bDisplayCustomIcon

uint8 bDisplayCustomIcon;

Override editor default icon with the custom icon chosen.


variable bUseCustomColors

uint8 bUseCustomColors;

Override editor preference colors.


variable bHideFromDropDownIfRulesFail

uint8 bHideFromDropDownIfRulesFail;

Hide this class from being selected in the node class drop down if its rules fail.


variable InputComponent

TObjectPtr< UInputComponent > InputComponent;

variable AutoReceiveInput

TEnumAsByte< ESMNodeInput::Type > AutoReceiveInput;

Automatically registers this node to receive input from a player. Input is valid only from when the node is initialized and until it is shutdown.


variable InputPriority

int32 InputPriority = 3;

The priority of this input component when pushed in to the stack. If AutoReceiveInput is set to UseOwningStateMachine this has no effect.


variable bBlockInput

uint8 bBlockInput;

Whether any components lower on the input stack should be allowed to receive input. If AutoReceiveInput is set to UseOwningStateMachine this has no effect.


Private Attributes Documentation

variable bHasEditorConstructionScripts

bool bHasEditorConstructionScripts = true;

variable bHasGameConstructionScripts

bool bHasGameConstructionScripts = true;

variable ArrayPropertyChanged

FName ArrayPropertyChanged;

variable ArrayIndexChanged

int32 ArrayIndexChanged;

variable ArrayChangeType

uint32 ArrayChangeType;

variable bIsNodePinChanging

bool bIsNodePinChanging;

Set from the editor when an exposed pin value is changing.


variable bIsThreadSafe

uint8 bIsThreadSafe;

If this node can be created on a new thread with async initialization. Valid for game and editor sessions.


variable bIsEditorThreadSafe

uint8 bIsEditorThreadSafe;

If this node can be created on a new thread with async initialization when playing in the editor. Nodes may contain editor only code that isn't always thread safe, such as slate styling found in TextGraph properties.

If you experience crashes in the editor with async initialization consider turning this off.


variable bIsEditorExecution

uint8 bIsEditorExecution;

If this node is executing for the editor, such as through construction scripts.


variable RunInitializedFrame

uint64 RunInitializedFrame;

End Input.

Return the frame this node was initialized for this run. Resets each time a run is initialized or shutdown. Primarily used for determining if input events should fire.


variable bIsInitialized

uint8 bIsInitialized;

True from NativeInitialize.


variable OwningNode

FSMNode_Base * OwningNode;

The owning node in the state machine instance.


variable TemplateGuid

FGuid TemplateGuid;

Assigned from the editor and used in tracking specific templates.


Friends

friend USMGraphNode_StateNode

friend class USMGraphNode_StateNode(
    USMGraphNode_StateNode 
);

friend USMGraphNode_TransitionEdge

friend class USMGraphNode_TransitionEdge(
    USMGraphNode_TransitionEdge 
);

friend FSMNode_Base

friend struct FSMNode_Base(
    FSMNode_Base 
);

friend USMGraphNode_Base

friend class USMGraphNode_Base(
    USMGraphNode_Base 
);

friend USMGraphK2Node_PropertyNode_Base

friend class USMGraphK2Node_PropertyNode_Base(
    USMGraphK2Node_PropertyNode_Base 
);