Skip to content

SMSystem

Description

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

Namespaces

Name
LD
ESMStateMachineInput
ESMNodeInput

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 USMBlueprintGeneratedClass
class USMNodeBlueprintGeneratedClass
class FSMCachedPropertyData
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 FSMReferenceContainer
struct FSMGuidMap
class USMInstance
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
class USMRuntimeSettings
struct FSMState_Base
struct FSMState
class USMStateInstance_Base
class USMStateInstance
class USMEntryStateInstance
class USMAnyStateInstance
struct FSMStateMachine
class USMStateMachineComponent
class USMStateMachineInstance
struct FSMTransaction_Base
struct FSMInitializeTransaction
struct FSMTransitionTransaction
struct FSMActivateStateTransaction
struct FSMFullSyncStateTransaction
struct FSMFullSyncTransaction
struct FSMTransition
class USMTransitionInstance
class USMBlueprintUtils
class USMUtils

Types

Name
enum uint8 ESMLogType
enum uint8 ESMNetworkConfigurationType
enum uint8 ESMExposedFunctionExecutionType
enum uint8 ESMConditionalEvaluationType
enum uint8 ESMExecutionEnvironment
enum uint8 ESMValidEditorNode
enum uint8 ESMCompilerLogType
enum uint8 ESMThreadMode
enum uint8 ESMTransactionType
enum uint8 ESMOptionalBool

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_DELEGATE(FOnReferencesReplicated )
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
GRAPH_PROPERTY_EVAL_CONDUIT_INIT
GRAPH_PROPERTY_EVAL_CONDUIT_TRANS_CHECK
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)
GRAPH_PROPERTY_EVAL_ANY
GRAPH_PROPERTY_EVAL_ON_START
GRAPH_PROPERTY_EVAL_ON_UPDATE
GRAPH_PROPERTY_EVAL_ON_END
GRAPH_PROPERTY_EVAL_ON_ROOT_SM_START
GRAPH_PROPERTY_EVAL_ON_ROOT_SM_STOP
SM_ACTIVE_TIME_NOT_SET

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 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_DELEGATE

DECLARE_DELEGATE(
    FOnReferencesReplicated 
)

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 GRAPH_PROPERTY_EVAL_CONDUIT_INIT

#define GRAPH_PROPERTY_EVAL_CONDUIT_INIT 100

define GRAPH_PROPERTY_EVAL_CONDUIT_TRANS_CHECK

#define GRAPH_PROPERTY_EVAL_CONDUIT_TRANS_CHECK 101

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); \
        FunctionHandlers = &ExposedNodeFunctions->LOGICDRIVER_FUNCTION_HANDLER_TYPE[0]; \
        FunctionHandlers->ExposedFunctionsOwner = ExposedNodeFunctions; \
    }

define INITIALIZE_EXPOSED_FUNCTIONS

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

define EXECUTE_EXPOSED_FUNCTIONS

#define EXECUTE_EXPOSED_FUNCTIONS(
    Handler,
    ...
)   if (FunctionHandlers) \
    { \
        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);

define GRAPH_PROPERTY_EVAL_ANY

#define GRAPH_PROPERTY_EVAL_ANY 0

define GRAPH_PROPERTY_EVAL_ON_START

#define GRAPH_PROPERTY_EVAL_ON_START 1

define GRAPH_PROPERTY_EVAL_ON_UPDATE

#define GRAPH_PROPERTY_EVAL_ON_UPDATE 2

define GRAPH_PROPERTY_EVAL_ON_END

#define GRAPH_PROPERTY_EVAL_ON_END 3

define GRAPH_PROPERTY_EVAL_ON_ROOT_SM_START

#define GRAPH_PROPERTY_EVAL_ON_ROOT_SM_START 4

define GRAPH_PROPERTY_EVAL_ON_ROOT_SM_STOP

#define GRAPH_PROPERTY_EVAL_ON_ROOT_SM_STOP 5

define SM_ACTIVE_TIME_NOT_SET

#define SM_ACTIVE_TIME_NOT_SET -1.f