Skip to content

USMEditorInstance

Module: SMSystemEditor

Inherits from USMInstance, UObject

Public Functions

Name
virtual void Initialize(UObject * Context) override
virtual void Shutdown() override

Additional inherited members

Public Functions inherited from USMInstance

Name
USMInstance()
void Tick(float DeltaTime) override
images/classes/SMInstance/img/nd_img_Tick.png
virtual bool IsTickable() const override
images/classes/SMInstance/img/nd_img_IsTickable.png
virtual bool IsTickableInEditor() const override
virtual ETickableTickType GetTickableTickType() const override
virtual bool IsTickableWhenPaused() const override
images/classes/SMInstance/img/nd_img_IsTickableWhenPaused.png
virtual UWorld * GetTickableGameObjectWorld() const override
virtual TStatId GetStatId() const override
virtual bool IsSupportedForNetworking() const override
virtual void GetLifetimeReplicatedProps(TArray< FLifetimeProperty > & OutLifetimeProps) const override
virtual void BeginDestroy() override
virtual UWorld * GetWorld() const override
virtual int32 GetFunctionCallspace(UFunction * Function, FFrame * Stack) override
virtual bool CallRemoteFunction(UFunction * Function, void * Parms, FOutParmRec * OutParms, FFrame * Stack) override
virtual UObject * GetContext() const override
images/classes/SMInstance/img/nd_img_GetContext.png
USMStateMachineComponent * GetComponentOwner() const
images/classes/SMInstance/img/nd_img_GetComponentOwner.png
void SetComponentOwner(USMStateMachineComponent * InComponent)
virtual void Start() override
images/classes/SMInstance/img/nd_img_Start.png
virtual void Update(float DeltaSeconds =0.f) override
images/classes/SMInstance/img/nd_img_Update.png
virtual void Stop() override
images/classes/SMInstance/img/nd_img_Stop.png
virtual void Restart() override
images/classes/SMInstance/img/nd_img_Restart.png
void ReplicatedStart()
images/classes/SMInstance/img/nd_img_ReplicatedStart.png
void ReplicatedStop()
images/classes/SMInstance/img/nd_img_ReplicatedStop.png
void ReplicatedRestart()
images/classes/SMInstance/img/nd_img_ReplicatedRestart.png
void StartWithNewContext(UObject * Context)
images/classes/SMInstance/img/nd_img_StartWithNewContext.png
void EvaluateTransitions()
images/classes/SMInstance/img/nd_img_EvaluateTransitions.png
bool EvaluateAndTakeTransitionChain(USMTransitionInstance * InFirstTransitionInstance)
images/classes/SMInstance/img/nd_img_EvaluateAndTakeTransitionChain.png
bool EvaluateAndTakeTransitionChain(FSMTransition & InFirstTransition)
bool EvaluateAndFindTransitionChain(USMTransitionInstance * InFirstTransitionInstance, TArray< USMTransitionInstance * > & OutTransitionChain, USMStateInstance_Base *& OutDestinationState, bool bRequirePreviousStateActive =true)
images/classes/SMInstance/img/nd_img_EvaluateAndFindTransitionChain.png
bool TakeTransitionChain(const TArray< USMTransitionInstance * > & InTransitionChain)
images/classes/SMInstance/img/nd_img_TakeTransitionChain.png
void PreloadAllNodeInstances()
images/classes/SMInstance/img/nd_img_PreloadAllNodeInstances.png
void ActivateStateLocally(const FGuid & StateGuid, bool bActive, bool bSetAllParents, bool bActivateNow =true)
void SwitchActiveState(USMStateInstance_Base * NewStateInstance, bool bDeactivateOtherStates =true)
images/classes/SMInstance/img/nd_img_SwitchActiveState.png
void SwitchActiveStateByQualifiedName(const FString & InFullPath, bool bDeactivateOtherStates =true)
images/classes/SMInstance/img/nd_img_SwitchActiveStateByQualifiedName.png
bool HasPendingActiveStates() const
bool IsUpdating() const
bool IsStopping() const
images/classes/SMInstance/img/nd_img_IsStopping.png
void LoadFromState(const FGuid & FromGuid, bool bAllParents =true, bool bNotify =true)
images/classes/SMInstance/img/nd_img_LoadFromState.png
void LoadFromMultipleStates(const TArray< FGuid > & FromGuids, bool bNotify =true)
images/classes/SMInstance/img/nd_img_LoadFromMultipleStates.png
bool AreInitialStatesSetFromLoad() const
images/classes/SMInstance/img/nd_img_AreInitialStatesSetFromLoad.png
void ClearLoadedStates()
images/classes/SMInstance/img/nd_img_ClearLoadedStates.png
void InitializeAsync(UObject * Context, const FOnStateMachineInstanceInitializedAsync & OnCompletedDelegate =FOnStateMachineInstanceInitializedAsync())
void K2_InitializeAsync(UObject * Context, FLatentActionInfo LatentInfo)
images/classes/SMInstance/img/nd_img_K2_InitializeAsync.png
void CancelAsyncInitialization()
void WaitForAsyncInitializationTask(bool bCallFinishInitialize =true)
void TryGetNestedActiveState(FSMStateInfo & FoundState, bool & bSuccess) const
images/classes/SMInstance/img/nd_img_TryGetNestedActiveState.png
FSMState_Base * GetSingleActiveState() const
FSMState_Base * GetSingleNestedActiveState() const
TArray< FSMState_Base * > GetAllActiveStates() const
FGuid GetSingleActiveStateGuid(bool bCheckNested =true) const
images/classes/SMInstance/img/nd_img_GetSingleActiveStateGuid.png
void GetAllActiveStateGuids(TArray< FGuid > & ActiveGuids) const
images/classes/SMInstance/img/nd_img_GetAllActiveStateGuids.png
TArray< FGuid > GetAllActiveStateGuidsCopy() const
USMStateInstance_Base * GetSingleActiveStateInstance(bool bCheckNested =true) const
images/classes/SMInstance/img/nd_img_GetSingleActiveStateInstance.png
void GetAllActiveStateInstances(TArray< USMStateInstance_Base * > & ActiveStateInstances) const
images/classes/SMInstance/img/nd_img_GetAllActiveStateInstances.png
TArray< USMInstance * > GetAllReferencedInstances(bool bIncludeChildren =false) const
images/classes/SMInstance/img/nd_img_GetAllReferencedInstances.png
TArray< FSMStateMachine * > GetStateMachinesWithReferences(bool bIncludeChildren =false) const
void TryGetStateInfo(const FGuid & Guid, FSMStateInfo & StateInfo, bool & bSuccess) const
images/classes/SMInstance/img/nd_img_TryGetStateInfo.png
void TryGetTransitionInfo(const FGuid & Guid, FSMTransitionInfo & TransitionInfo, bool & bSuccess) const
images/classes/SMInstance/img/nd_img_TryGetTransitionInfo.png
USMInstance * GetReferencedInstanceByGuid(const FGuid & Guid) const
images/classes/SMInstance/img/nd_img_GetReferencedInstanceByGuid.png
USMStateInstance_Base * GetStateInstanceByGuid(const FGuid & Guid) const
images/classes/SMInstance/img/nd_img_GetStateInstanceByGuid.png
USMTransitionInstance * GetTransitionInstanceByGuid(const FGuid & Guid) const
images/classes/SMInstance/img/nd_img_GetTransitionInstanceByGuid.png
USMNodeInstance * GetNodeInstanceByGuid(const FGuid & Guid) const
images/classes/SMInstance/img/nd_img_GetNodeInstanceByGuid.png
USMStateInstance_Base * GetStateInstanceByQualifiedName(const FString & InFullPath) const
images/classes/SMInstance/img/nd_img_GetStateInstanceByQualifiedName.png
FSMState_Base * GetStateByGuid(const FGuid & Guid) const
FSMTransition * GetTransitionByGuid(const FGuid & Guid) const
FSMNode_Base * GetNodeByGuid(const FGuid & Guid) const
FSMState_Base * FindStateByGuid(const FGuid & Guid) const
TMap< FGuid, FGuid > & GetGuidRedirectMap()
images/classes/SMInstance/img/nd_img_GetGuidRedirectMap.png
void SetGuidRedirectMap(const TMap< FGuid, FGuid > & InGuidMap)
images/classes/SMInstance/img/nd_img_SetGuidRedirectMap.png
FGuid GetRedirectedGuid(const FGuid & InPathGuid) const
FSMStateMachine & GetRootStateMachine()
USMStateMachineInstance * GetRootStateMachineNodeInstance() const
images/classes/SMInstance/img/nd_img_GetRootStateMachineNodeInstance.png
bool IsActive() const
images/classes/SMInstance/img/nd_img_IsActive.png
bool CanEverTick() const
images/classes/SMInstance/img/nd_img_CanEverTick.png
void SetCanEverTick(bool Value)
images/classes/SMInstance/img/nd_img_SetCanEverTick.png
bool IsTickRegistered() const
void SetRegisterTick(bool Value)
void SetTickOnManualUpdate(bool Value)
images/classes/SMInstance/img/nd_img_SetTickOnManualUpdate.png
bool CanTickOnManualUpdate() const
images/classes/SMInstance/img/nd_img_CanTickOnManualUpdate.png
void SetCanTickWhenPaused(bool Value)
images/classes/SMInstance/img/nd_img_SetCanTickWhenPaused.png
void SetCanTickInEditor(bool Value)
void SetTickBeforeBeginPlay(bool Value)
images/classes/SMInstance/img/nd_img_SetTickBeforeBeginPlay.png
void SetTickInterval(float Value)
images/classes/SMInstance/img/nd_img_SetTickInterval.png
void SetAutoManageTime(bool Value)
images/classes/SMInstance/img/nd_img_SetAutoManageTime.png
bool CanAutoManageTime() const
images/classes/SMInstance/img/nd_img_CanAutoManageTime.png
float GetTickInterval() const
images/classes/SMInstance/img/nd_img_GetTickInterval.png
void SetStopOnEndState(bool Value)
images/classes/SMInstance/img/nd_img_SetStopOnEndState.png
bool GetStopOnEndState() const
images/classes/SMInstance/img/nd_img_GetStopOnEndState.png
bool IsInEndState() const
images/classes/SMInstance/img/nd_img_IsInEndState.png
void SetContext(UObject * Context)
images/classes/SMInstance/img/nd_img_SetContext.png
const TMap< FGuid, FSMNode_Base * > & GetNodeMap() const
const TMap< FGuid, FSMState_Base * > & GetStateMap() const
const TMap< FGuid, FSMTransition * > & GetTransitionMap() const
const TArray< FSMStateHistory > & GetStateHistory() const
images/classes/SMInstance/img/nd_img_GetStateHistory.png
void SetStateHistoryMaxCount(int32 NewSize)
images/classes/SMInstance/img/nd_img_SetStateHistoryMaxCount.png
int32 GetStateHistoryMaxCount() const
images/classes/SMInstance/img/nd_img_GetStateHistoryMaxCount.png
void ClearStateHistory()
images/classes/SMInstance/img/nd_img_ClearStateHistory.png
void GetAllStateInstances(TArray< USMStateInstance_Base * > & StateInstances) const
images/classes/SMInstance/img/nd_img_GetAllStateInstances.png
void GetAllTransitionInstances(TArray< USMTransitionInstance * > & TransitionInstances) const
images/classes/SMInstance/img/nd_img_GetAllTransitionInstances.png
void SetNetworkInterface(TScriptInterface< ISMStateMachineNetworkedInterface > InNetworkInterface)
TScriptInterface< ISMStateMachineNetworkedInterface > GetNetworkInterface() const
images/classes/SMInstance/img/nd_img_GetNetworkInterface.png
void K2_TryGetNetworkInterface(TScriptInterface< ISMStateMachineNetworkedInterface > & Interface, bool & bIsValid)
images/classes/SMInstance/img/nd_img_K2_TryGetNetworkInterface.png
ISMStateMachineNetworkedInterface * TryGetNetworkInterface() const
void UpdateNetworkConditions()
void CopyNetworkConditionsFrom(USMInstance * OtherInstance, bool bUpdateNodes =false)
void SetAllowTransitionsLocally(bool bCanEvaluateTransitions, bool bCanTakeTransitions)
void SetAllowStateLogic(bool bAllow)
bool HasStarted() const
images/classes/SMInstance/img/nd_img_HasStarted.png
bool IsInitialized() const
images/classes/SMInstance/img/nd_img_IsInitialized.png
bool IsInitializingAsync() const
images/classes/SMInstance/img/nd_img_IsInitializingAsync.png
bool IsReferenceTemplate() const
void SetReferenceOwner(USMInstance * Owner)
void AddReplicatedReference(const FGuid & PathGuid, USMInstance * NewReference)
USMInstance * FindReplicatedReference(const FGuid & PathGuid) const
const TArray< FSMReferenceContainer > & GetReplicatedReferences() const
bool HaveAllReferencesReplicated() const
bool CanReplicateAsReference() const
const USMInstance * GetReferenceOwnerConst() const
const USMInstance * GetPrimaryReferenceOwnerConst() const
bool IsPrimaryReferenceOwner() const
USMInstance * GetReferenceOwner() const
images/classes/SMInstance/img/nd_img_GetReferenceOwner.png
USMInstance * GetPrimaryReferenceOwner()
images/classes/SMInstance/img/nd_img_GetPrimaryReferenceOwner.png
TSubclassOf< USMStateMachineInstance > GetRootStateMachineNodeClass() const
images/classes/SMInstance/img/nd_img_GetRootStateMachineNodeClass.png
TSubclassOf< USMStateMachineInstance > GetStateMachineClass() const
void SetRootStateMachineNodeClass(TSubclassOf< USMStateMachineInstance > NewStateMachineNodeClass)
images/classes/SMInstance/img/nd_img_SetRootStateMachineNodeClass.png
void SetStateMachineClass(TSubclassOf< USMStateMachineInstance > NewStateMachineClass)
void OnPreStateMachineInitialized()
images/classes/SMInstance/img/nd_img_OnPreStateMachineInitialized.png
void OnStateMachineInitialized()
images/classes/SMInstance/img/nd_img_OnStateMachineInitialized.png
void OnStateMachineStart()
images/classes/SMInstance/img/nd_img_OnStateMachineStart.png
void OnStateMachineUpdate(float DeltaSeconds)
images/classes/SMInstance/img/nd_img_OnStateMachineUpdate.png
void OnStateMachineStop()
images/classes/SMInstance/img/nd_img_OnStateMachineStop.png
void OnStateMachineShutdown()
images/classes/SMInstance/img/nd_img_OnStateMachineShutdown.png
void OnStateMachineTransitionTaken(const FSMTransitionInfo & Transition)
images/classes/SMInstance/img/nd_img_OnStateMachineTransitionTaken.png
void OnStateMachineStateChanged(const FSMStateInfo & ToState, const FSMStateInfo & FromState)
images/classes/SMInstance/img/nd_img_OnStateMachineStateChanged.png
void OnStateMachineStateStarted(const FSMStateInfo & State)
images/classes/SMInstance/img/nd_img_OnStateMachineStateStarted.png
void NotifyTransitionTaken(const FSMTransition & Transition)
void NotifyStateChange(FSMState_Base * ToState, FSMState_Base * FromState)
void NotifyStateStarted(const FSMState_Base & State)
FSMDebugStateMachine & GetDebugStateMachine()
const FSMDebugStateMachine & GetDebugStateMachineConst() const
bool IsLoggingEnabled() const
void RunUpdateAsReference(float DeltaSeconds)
TEnumAsByte< ESMStateMachineInput::Type > GetInputType() const
Input.
int32 GetInputPriority() const
bool GetBlockInput() const
APlayerController * GetInputController() const
void SetAutoReceiveInput(ESMStateMachineInput::Type InInputType)
void SetInputPriority(int32 InInputPriority)
void SetBlockInput(bool bNewValue)
UInputComponent * GetInputComponent() const
images/classes/SMInstance/img/nd_img_GetInputComponent.png
const TMap< FGuid, FSMGuidMap > & GetRootPathGuidCache() const
void SetRootPathGuidCache(const TMap< FGuid, FSMGuidMap > & InGuidCache)
TSharedPtr< FSMCachedPropertyData, ESPMode::ThreadSafe > GetCachedPropertyData()
TMap< FGuid, FSMExposedNodeFunctions > & GetNodeExposedFunctions()
void AddNonThreadSafeNode(FSMNode_Base * InNode)
FString GetRootNodeNameDefault()
FName GetStateMachineClassPropertyName()
FName GetInternalEventUpdateFunctionName()
FName GetInternalEvaluateAndTakeTransitionChainFunctionName()
FName GetInternalEventCleanupFunctionName()

Protected Functions inherited from USMInstance

Name
void OnStateMachineInitialStateLoaded(const FGuid & StateGuid)
images/classes/SMInstance/img/nd_img_OnStateMachineInitialStateLoaded.png
virtual void OnStateMachineInitialStateLoaded_Implementation(const FGuid & StateGuid)
virtual void FinishInitialize()
bool HandleStopOnEndState()
virtual void CleanupAsyncObjects()
void CleanupAsyncInitializationTask()
virtual void Tick_Implementation(float DeltaTime)
virtual void OnPreStateMachineInitialized_Implementation()
virtual void OnStateMachineInitialized_Implementation()
virtual void OnStateMachineStart_Implementation()
virtual void OnStateMachineUpdate_Implementation(float DeltaSeconds)
virtual void OnStateMachineStop_Implementation()
virtual void OnStateMachineShutdown_Implementation()
virtual void OnStateMachineTransitionTaken_Implementation(const FSMTransitionInfo & Transition)
virtual void OnStateMachineStateChanged_Implementation(const FSMStateInfo & ToState, const FSMStateInfo & FromState)
virtual void OnStateMachineStateStarted_Implementation(const FSMStateInfo & State)
void Internal_Update(float DeltaSeconds)
bool Internal_EvaluateAndTakeTransitionChainByGuid(const FGuid & PathGuid)
void Internal_EventUpdate()
void Internal_EventCleanup(const FGuid & PathGuid)
void BuildStateMachineMap(FSMStateMachine * StateMachine)
void BuildStateMachineMap(FSMStateMachine * StateMachine, TSet< USMInstance * > & InstancesMapped)
bool CheckIsInitialized() const
void UpdateTime()
void RecordPreviousStateHistory(FSMState_Base * PreviousState)
void TrimStateHistory()

Public Attributes inherited from USMInstance

Name
FGuid RootStateMachineGuid
FOnStateMachineInitializedSignature OnPreStateMachineInitializedEvent
FOnStateMachineInitializedSignature OnStateMachineInitializedEvent
FOnStateMachineStartedSignature OnStateMachineStartedEvent
FOnStateMachineUpdatedSignature OnStateMachineUpdatedEvent
FOnStateMachineStoppedSignature OnStateMachineStoppedEvent
FOnStateMachineShutdownSignature OnStateMachineShutdownEvent
FOnStateMachineTransitionTakenSignature OnStateMachineTransitionTakenEvent
FOnStateMachineStateChangedSignature OnStateMachineStateChangedEvent
FOnStateMachineStateStartedSignature OnStateMachineStateStartedEvent
TArray< TObjectPtr< UObject > > ReferenceTemplates

Protected Attributes inherited from USMInstance

Name
TObjectPtr< USMStateMachineComponent > ComponentOwner
TScriptInterface< ISMStateMachineNetworkedInterface > NetworkInterface
TMap< FGuid, FSMNode_Base * > GuidNodeMap
TMap< FGuid, FSMState_Base * > GuidStateMap
TMap< FGuid, FSMTransition * > GuidTransitionMap
TSet< FGuid > StateMachineGuids
FSMStateMachine RootStateMachine
TObjectPtr< UObject > R_StateMachineContext
TObjectPtr< USMInstance > ReferenceOwner
TSubclassOf< USMStateMachineInstance > StateMachineClass
uint8 bAutoManageTime
uint8 bStopOnEndState
uint8 bCanEverTick
uint8 bCanTickInEditor
uint8 bCanTickWhenPaused
uint8 bTickRegistered
uint8 bTickBeforeInitialize
uint8 bTickBeforeBeginPlay
float TickInterval
float TimeSinceAllowedTick
float WorldSeconds
float WorldTimeDelta
TObjectPtr< UInputComponent > InputComponent
TEnumAsByte< ESMStateMachineInput::Type > AutoReceiveInput
int32 InputPriority
uint8 bBlockInput
TArray< FSMStateHistory > StateHistory
End Input.
int32 StateHistoryMaxCount
uint16 bEnableLogging
uint16 bLogStateChange
uint16 bLogTransitionTaken
uint16 bCanReplicateAsReference
uint16 bCallTickOnManualUpdate
uint16 bIsTicking
uint16 bIsUpdating
uint16 bCanEvaluateTransitionsLocally
uint16 bCanTakeTransitionsLocally
uint16 bCanExecuteStateLogic
uint16 bHasStarted
uint16 bLoadFromStatesCalled
uint16 bInitialized
uint16 bWaitingForStop
uint16 bIsStopping

Friends inherited from USMInstance

Name
class USMStateMachineComponent

Public Functions Documentation

function Initialize

virtual void Initialize(
    UObject * Context
) override

function Shutdown

virtual void Shutdown() override