Skip to content

SMSystem¶

Description¶

The primary run-time module for Logic Driver. This is included in shipping builds.

Namespaces¶

Classes¶

Name
class ISMEditorGraphNode_StateBaseInterface
class USMEditorGraphNodeInterface
class ISMEditorGraphNodeInterface
class USMEditorGraphPropertyNodeInterface
class ISMEditorGraphPropertyNodeInterface
class USMInstanceInterface
class ISMInstanceInterface
class USMStateMachineInterface
class ISMStateMachineInterface
class USMStateMachineNetworkedInterface
class ISMStateMachineNetworkedInterface
class ISMSystemModule
class USMBlueprint
class USMNodeBlueprint
class FSMBlueprintDebugEditorBridge
class USMBlueprintGeneratedClass
class USMNodeBlueprintGeneratedClass
class FSMCachedPropertyData
struct FSMConduitRuntimeData
struct FSMConduit
class USMConduitInstance
struct FSMExposedFunctionHandler
struct FSMExposedFunctionContainer
struct FSMNode_FunctionHandlers
struct FSMState_FunctionHandlers
struct FSMConduit_FunctionHandlers
struct FSMTransition_FunctionHandlers
struct FSMExposedNodeFunctions
struct FSMGraphProperty_Base_Runtime
struct FSMGraphProperty_Runtime
struct FSMGraphPropertyTemplateOwner
struct FSMGraphProperty_Base
struct FSMGraphProperty
struct FSMDebugStateMachine
struct FSMGuidMap
class USMInstance
struct FSMNodeRuntimeData
struct FSMNode_Base
struct FSMInfo_Base
struct FSMTransitionInfo
struct FSMStateInfo
struct FSMStateHistory
struct FSMNodeDescription
class USMCompilerLog
class USMNodeInstance
struct FSMNodeClassRule
struct FSMStateClassRule
struct FSMTransitionClassRule
struct FSMStateMachineClassRule
struct FSMNodeConnectionRule
struct FSMConnectionValidator
struct FSMTransitionConnectionValidator
struct FSMStateConnectionValidator
struct FSMStateMachineNodePlacementValidator
struct FSMNodeWidgetInfo
struct FSMTextDisplayWidgetInfo
struct FSMProxyPropertyPath
struct FSMProxyPropertyData
struct FSMNodeProxyPropertyData
struct FSMInstanceProxyPropertyData
struct FSMReplicationContainer
struct FSMReferenceContainer
struct FSMNodeStackInstanceContainer
struct FSMNodeInstanceContainer
class USMRuntimeSettings
struct FSMStateBaseRuntimeData
struct FSMState_Base
struct FSMState
class USMStateInstance_Base
class USMStateInstance
class USMEntryStateInstance
class USMAnyStateInstance
struct FSMStateMachineRuntimeData
struct FSMStateMachine
class USMStateMachineComponent
class USMStateMachineInstance
struct FSMTransaction_Base
struct FSMInitializeTransaction
struct FSMTransitionTransaction
struct FSMActivateStateTransaction
struct FSMFullSyncStateTransaction
struct FSMFullSyncTransaction
struct FSMTransitionRuntimeData
struct FSMTransition
class USMTransitionInstance
class USMBlueprintUtils
class USMUtils

Types¶

Functions¶

Name
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnStateMachineInitializedSignature , class USMInstance * , Instance )
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnStateMachineStartedSignature , class USMInstance * , Instance )
DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FOnStateMachineUpdatedSignature , class USMInstance * , Instance , float , DeltaSeconds )
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnStateMachineStoppedSignature , class USMInstance * , Instance )
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnStateMachineShutdownSignature , class USMInstance * , Instance )
DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FOnStateMachineTransitionTakenSignature , class USMInstance * , Instance , struct FSMTransitionInfo , Transition )
DECLARE_DYNAMIC_MULTICAST_DELEGATE_ThreeParams(FOnStateMachineStateChangedSignature , class USMInstance * , Instance , struct FSMStateInfo , NewState , struct FSMStateInfo , PreviousState )
DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FOnStateMachineStateStartedSignature , class USMInstance * , Instance , struct FSMStateInfo , State )
DECLARE_DELEGATE_OneParam(FOnStateMachineInstanceInitializedAsync , USMInstance * )
DECLARE_LOG_CATEGORY_EXTERN(LogLogicDriver , Log , All )
DECLARE_DWORD_ACCUMULATOR_STAT_EXTERN(TEXT("SMNodeInstances") , STAT_NodeInstances , STATGROUP_LogicDriver , SMSYSTEM_API )
DECLARE_DELEGATE_TwoParams(FOnCompilerLogSignature , ESMCompilerLogType , const FString & )
DECLARE_DELEGATE_SevenParams(FOnCompilerLogPropertySignature , const FName & , int32 , const FString & , ESMCompilerLogType , bool , bool , const USMNodeInstance * )
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnStateBeginSignature , class USMStateInstance_Base * , StateInstance )
DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FOnStateUpdateSignature , class USMStateInstance_Base * , StateInstance , float , DeltaSeconds )
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnStateEndSignature , class USMStateInstance_Base * , StateInstance )
DECLARE_DELEGATE_OneParam(FOnStateMachineComponentInitializedAsync , USMStateMachineComponent * )
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnTransitionEnteredSignature , class USMTransitionInstance * , TransitionInstance )

Defines¶

Name
LD_PLUGIN_NAME
LOGICDRIVER_RUNTIME_MODULE_NAME
SM_ACTIVE_TIME_NOT_SET
INITIALIZE_NODE_FUNCTION_HANDLER()
INITIALIZE_EXPOSED_FUNCTIONS(Handler)
EXECUTE_EXPOSED_FUNCTIONS(Handler, ...)
LD_LOG_VERBOSE(FMT, ...)
LD_LOG_INFO(FMT, ...)
LD_LOG_WARNING(FMT, ...)
LD_LOG_ERROR(FMT, ...)
GET_NODE_STRUCT_VALUE(StructType, StructVariable)
GET_NODE_DEFAULT_VALUE_DIF_VAR(StructType, InstanceVariable, StructVariable)
GET_NODE_DEFAULT_VALUE(StructType, Variable)
SET_NODE_DEFAULT_VALUE_DIF_VAR(StructType, InstanceVariable, StructVariable, Value)
SET_NODE_DEFAULT_VALUE(StructType, Variable, Value)

Types Documentation¶

enum ESMLogType¶

Enumerator Value Description
Note
Warning
Error

Generic logging enum.


enum ESMNetworkConfigurationType¶

Enumerator Value Description
SM_Client
SM_Server
SM_ClientAndServer

enum ESMExposedFunctionExecutionType¶

Enumerator Value Description
SM_Graph
SM_NodeInstance
SM_None

enum ESMConditionalEvaluationType¶

Enumerator Value Description
SM_Graph
SM_NodeInstance
SM_AlwaysFalse
SM_AlwaysTrue

enum ESMGraphPropertyFlags¶

Enumerator Value Description
None 0
DefaultValueOnly 1 << 0 If only a default value is assigned (no variable connected).
Input 1 << 1 The variable supports input connections.
Output 1 << 2 The variable supports output connections.

Graph property configuration flags.


enum ESMGraphPropertyDirection¶

Enumerator Value Description
Input Graph property accepts input.
Output Graph property writes to output.
Both Graph property accepts input and output.

The direction of the graph property.


enum ESMGraphPropertyEvalFlags¶

Enumerator Value Description
OnStart 1 << 0 Should graph properties evaluate when initializing or on state start.
OnUpdate 1 << 1 Should graph properties evaluate on state update.
OnEnd 1 << 2 Should graph properties evaluate on state end.
OnRootStateMachineStart 1 << 3 Should graph properties evaluate on root state machine start.
OnRootStateMachineStop 1 << 4 Should graph properties evaluate on root state machine end.
OnTransitionInitialize 1 << 5 Should graph properties evaluate when transitions are initializing.
OnTransitionEval 1 << 6 Should graph properties evaluate when transitions are evaluating.

Evaluation flags for determining when graph properties should evaluate.


enum ESMExecutionEnvironment¶

Enumerator Value Description
EditorExecution 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.

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.

To configure editor construction script settings, go under Project Settings -> Logic Driver -> Editor Node Construction Script Setting. | | GameExecution | | This node is running in a simulation or game. |


enum ESMValidEditorNode¶

Enumerator Value Description
IsValidEditorNode This is a valid UEdGraphNode obtained during editor design time.
IsNotValidEditorNode This is not a valid UEdGraphNode which means execution is most likely running from a new instantiation or a development run-time.

Enumerates UEdGraphNode validity.


enum ESMCompilerLogType¶

Enumerator Value Description
Note An informational message.
Warning Warn of an issue but still allow the blueprint to compile.
Error An error will prevent the blueprint from compiling.

enum ESMThreadMode¶

Enumerator Value Description
Blocking Run single threaded blocking in the game thread.
Async Run asynchronous out of the game thread.

enum ESMTransactionType¶

Enumerator Value Description
SM_Unknown
SM_Transition
SM_State
SM_FullSync
SM_Start
SM_Stop
SM_Initialize
SM_Shutdown

enum ESMOptionalBool¶

Enumerator Value Description
Unset 0
IsFalse
IsTrue

Represents an optional bool which may not be set and is supported by the editor UI.


Functions Documentation¶

function DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam¶

DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(
    FOnStateMachineInitializedSignature ,
    class USMInstance * ,
    Instance 
)

function DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam¶

DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(
    FOnStateMachineStartedSignature ,
    class USMInstance * ,
    Instance 
)

function DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams¶

DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(
    FOnStateMachineUpdatedSignature ,
    class USMInstance * ,
    Instance ,
    float ,
    DeltaSeconds 
)

function DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam¶

DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(
    FOnStateMachineStoppedSignature ,
    class USMInstance * ,
    Instance 
)

function DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam¶

DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(
    FOnStateMachineShutdownSignature ,
    class USMInstance * ,
    Instance 
)

function DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams¶

DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(
    FOnStateMachineTransitionTakenSignature ,
    class USMInstance * ,
    Instance ,
    struct FSMTransitionInfo ,
    Transition 
)

function DECLARE_DYNAMIC_MULTICAST_DELEGATE_ThreeParams¶

DECLARE_DYNAMIC_MULTICAST_DELEGATE_ThreeParams(
    FOnStateMachineStateChangedSignature ,
    class USMInstance * ,
    Instance ,
    struct FSMStateInfo ,
    NewState ,
    struct FSMStateInfo ,
    PreviousState 
)

function DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams¶

DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(
    FOnStateMachineStateStartedSignature ,
    class USMInstance * ,
    Instance ,
    struct FSMStateInfo ,
    State 
)

function DECLARE_DELEGATE_OneParam¶

DECLARE_DELEGATE_OneParam(
    FOnStateMachineInstanceInitializedAsync ,
    USMInstance * 
)

function DECLARE_LOG_CATEGORY_EXTERN¶

DECLARE_LOG_CATEGORY_EXTERN(
    LogLogicDriver ,
    Log ,
    All 
)

function DECLARE_DWORD_ACCUMULATOR_STAT_EXTERN¶

DECLARE_DWORD_ACCUMULATOR_STAT_EXTERN(
    TEXT("SMNodeInstances") ,
    STAT_NodeInstances ,
    STATGROUP_LogicDriver ,
    SMSYSTEM_API 
)

function DECLARE_DELEGATE_TwoParams¶

DECLARE_DELEGATE_TwoParams(
    FOnCompilerLogSignature ,
    ESMCompilerLogType ,
    const FString & 
)

function DECLARE_DELEGATE_SevenParams¶

DECLARE_DELEGATE_SevenParams(
    FOnCompilerLogPropertySignature ,
    const FName & ,
    int32 ,
    const FString & ,
    ESMCompilerLogType ,
    bool ,
    bool ,
    const USMNodeInstance * 
)

function DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam¶

DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(
    FOnStateBeginSignature ,
    class USMStateInstance_Base * ,
    StateInstance 
)

function DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams¶

DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(
    FOnStateUpdateSignature ,
    class USMStateInstance_Base * ,
    StateInstance ,
    float ,
    DeltaSeconds 
)

function DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam¶

DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(
    FOnStateEndSignature ,
    class USMStateInstance_Base * ,
    StateInstance 
)

function DECLARE_DELEGATE_OneParam¶

DECLARE_DELEGATE_OneParam(
    FOnStateMachineComponentInitializedAsync ,
    USMStateMachineComponent * 
)

function DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam¶

DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(
    FOnTransitionEnteredSignature ,
    class USMTransitionInstance * ,
    TransitionInstance 
)

Macro Documentation¶

define LD_PLUGIN_NAME¶

#define LD_PLUGIN_NAME "SMSystem"

define LOGICDRIVER_RUNTIME_MODULE_NAME¶

#define LOGICDRIVER_RUNTIME_MODULE_NAME "SMSystem"

define SM_ACTIVE_TIME_NOT_SET¶

#define SM_ACTIVE_TIME_NOT_SET -1.f

define INITIALIZE_NODE_FUNCTION_HANDLER¶

#define INITIALIZE_NODE_FUNCTION_HANDLER(

)   if (FSMExposedNodeFunctions* ExposedNodeFunctions = LD::ExposedFunctions::FindExposedNodeFunctions(this)) \
    { \
        check(ExposedNodeFunctions->LOGICDRIVER_FUNCTION_HANDLER_TYPE.Num() > 0); \
        const auto& LocalRuntimeData = GetRuntimeData(); \
        LocalRuntimeData->FunctionHandlers = &ExposedNodeFunctions->LOGICDRIVER_FUNCTION_HANDLER_TYPE[0]; \
        LocalRuntimeData->FunctionHandlers->ExposedFunctionsOwner = ExposedNodeFunctions; \
    }

define INITIALIZE_EXPOSED_FUNCTIONS¶

#define INITIALIZE_EXPOSED_FUNCTIONS(
    Handler
)   if (FSMNode_FunctionHandlers* FunctionHandlers = GetFunctionHandlers()) \
    { \
        LD::ExposedFunctions::InitializeGraphFunctions(*(&static_cast<LOGICDRIVER_FUNCTION_HANDLER_TYPE*>(FunctionHandlers)->Handler), GetOwningInstance(), GetNodeInstance()); \
    } \

define EXECUTE_EXPOSED_FUNCTIONS¶

#define EXECUTE_EXPOSED_FUNCTIONS(
    Handler,
    ...
)   if (FSMNode_FunctionHandlers* FunctionHandlers = GetFunctionHandlers()) \
    { \
        LD::ExposedFunctions::ExecuteGraphFunctions(*&static_cast<LOGICDRIVER_FUNCTION_HANDLER_TYPE*>(FunctionHandlers)->Handler, GetOwningInstance(), GetNodeInstance(), ##__VA_ARGS__); \
    } \

define LD_LOG_VERBOSE¶

#define LD_LOG_VERBOSE(
    FMT,
    ...
) UE_LOG(LogLogicDriver, Verbose, (FMT), ##__VA_ARGS__)

define LD_LOG_INFO¶

#define LD_LOG_INFO(
    FMT,
    ...
) UE_LOG(LogLogicDriver, Log, (FMT), ##__VA_ARGS__)

define LD_LOG_WARNING¶

#define LD_LOG_WARNING(
    FMT,
    ...
) UE_LOG(LogLogicDriver, Warning, (FMT), ##__VA_ARGS__)

define LD_LOG_ERROR¶

#define LD_LOG_ERROR(
    FMT,
    ...
) UE_LOG(LogLogicDriver, Error, (FMT), ##__VA_ARGS__)

define GET_NODE_STRUCT_VALUE¶

#define GET_NODE_STRUCT_VALUE(
    StructType,
    StructVariable
)   if (StructType* StructOwner = GetOwningNodeAs<StructType>()) \
    { \
        return StructOwner->StructVariable; \
    } \

define GET_NODE_DEFAULT_VALUE_DIF_VAR¶

#define GET_NODE_DEFAULT_VALUE_DIF_VAR(
    StructType,
    InstanceVariable,
    StructVariable
)       GET_NODE_STRUCT_VALUE(StructType, StructVariable) \
        return InstanceVariable;

define GET_NODE_DEFAULT_VALUE¶

#define GET_NODE_DEFAULT_VALUE(
    StructType,
    Variable
)       GET_NODE_DEFAULT_VALUE_DIF_VAR(StructType, Variable, Variable);

define SET_NODE_DEFAULT_VALUE_DIF_VAR¶

#define SET_NODE_DEFAULT_VALUE_DIF_VAR(
    StructType,
    InstanceVariable,
    StructVariable,
    Value
)       InstanceVariable = Value; \
        if (StructType* StructOwner = GetOwningNodeAs<StructType>()) \
        { \
            StructOwner->StructVariable = Value; \
        }

define SET_NODE_DEFAULT_VALUE¶

#define SET_NODE_DEFAULT_VALUE(
    StructType,
    Variable,
    Value
)       SET_NODE_DEFAULT_VALUE_DIF_VAR(StructType, Variable, Variable, Value);