FSMStateMachine¶
Module: SMSystem
#include <SMStateMachine.h>
Inherits from FSMState_Base, FSMNode_Base
Description¶
State machines contain states and transitions. When a transition succeeds the current state advances to the next. FSMStateMachine is also considered a state since it inherits from FSMState_Base, making it possible to nest state machines.
When configured as a reference this will defer handling to the SMInstance (or in some cases the RootStateMachine) of the referenced Blueprint.
Public Classes¶
Name | |
---|---|
struct | FGetNodeArgs |
struct | FStateScopingArgs |
Public Functions¶
Name | |
---|---|
FSMStateMachine() | |
virtual void | Initialize(UObject * Instance) override |
virtual void | InitializeGraphFunctions() override |
virtual void | Reset() override |
virtual void | ResetReadStates() override |
virtual bool | StartState() override |
virtual bool | UpdateState(float DeltaSeconds) override |
virtual bool | EndState(float DeltaSeconds, const FSMTransition * TransitionToTake =nullptr) override |
virtual void | ExecuteInitializeNodes() override |
virtual void | ExecuteShutdownNodes() override |
virtual void | OnStartedByInstance(USMInstance * Instance) override |
virtual void | OnStoppedByInstance(USMInstance * Instance) override |
virtual void | CalculatePathGuid(TMap< FString, int32 > & InOutMappedPaths, bool bUseGuidCache =false) override |
virtual void | RunConstructionScripts() override |
virtual bool | IsInEndState() const override |
virtual bool | IsEndState() const override |
virtual bool | IsStateMachine() const override |
virtual bool | IsNodeInstanceClassCompatible(UClass * NewNodeInstanceClass) const override |
virtual USMNodeInstance * | GetNodeInstance() const override |
virtual USMNodeInstance * | GetOrCreateNodeInstance() override |
virtual bool | CanEverCreateNodeInstance() const override |
virtual UClass * | GetDefaultNodeInstanceClass() const override |
virtual FSMNode_Base * | GetOwnerNode() const override |
virtual void | SetStartTime(const FDateTime & InStartTime) override |
virtual void | SetEndTime(const FDateTime & InEndTime) override |
virtual void | SetServerTimeInState(float InTime) override |
bool | IsStateMachineInEndState() const |
bool | HasStateMachineReachedEndStateForRun() const |
void | AddState(FSMState_Base * State) |
void | AddTransition(FSMTransition * Transition) |
void | AddInitialState(FSMState_Base * State) |
void | AddTemporaryInitialState(FSMState_Base * State) |
void | ClearTemporaryInitialStates(bool bRecursive =false) |
void | SetFromTemporaryInitialStates() |
bool | ContainsActiveState(FSMState_Base * StateToCheck) const |
bool | HasActiveStates() const |
bool | HasTemporaryEntryStates() const |
FSMState_Base * | GetSingleActiveState() const |
TArray< FSMState_Base * > | GetActiveStates() const |
TArray< FSMState_Base * > | GetAllNestedActiveStates() const |
TArray< FSMNode_Base * > | GetAllNodes(const FGetNodeArgs & InArgs =FGetNodeArgs()) const |
TArray< FSMNode_Base * > | GetAllNodes(bool bIncludeNested, bool bForwardToReference =false) const |
const TArray< FSMState_Base * > & | GetStates() const |
const TArray< FSMTransition * > & | GetTransitions() const |
const TArray< FSMState_Base * > & | GetEntryStates() const |
TArray< FSMState_Base * > | GetInitialStates() const |
FSMState_Base * | GetSingleInitialState() const |
FSMState_Base * | GetSingleInitialTemporaryState() const |
TArray< FSMState_Base * > | GetAllNestedInitialTemporaryStates() const |
FSMState_Base * | FindState(const FGuid & StateGuid) const |
void | SetNetworkedConditions(TScriptInterface< ISMStateMachineNetworkedInterface > InNetworkInterface, bool bEvaluateTransitions, bool bTakeTransitions, bool bCanExecuteStateLogic) |
void | ProcessStates(float DeltaSeconds, bool bForceTransitionEvaluationOnly =false, const FGuid & InCurrentRunGuid =FGuid(), const FStateScopingArgs & InStateScopingArgs =FStateScopingArgs()) |
bool | ProcessTransition(FSMTransition * Transition, FSMState_Base * SourceState, FSMState_Base * DestinationState, const FSMTransitionTransaction * Transaction, float DeltaSeconds, FDateTime * CurrentTime =nullptr) |
bool | EvaluateAndTakeTransitionChain(FSMTransition * InFirstTransition) |
bool | TakeTransitionChain(const TArray< FSMTransition * > & InTransitionChain) |
bool | TryStartState(FSMState_Base * InState, bool * bOutSafeToCheckTransitions =nullptr) |
bool | TryTakeTransitionChain(const TArray< FSMTransition * > & InTransitionChain, float DeltaSeconds, bool bStateJustStarted =false, FSMState_Base ** OutDestinationState =nullptr) |
bool | CanProcessExternalTransition() const |
bool | IsWaitingForUpdate() const |
void | SetReuseCurrentState(bool bValue, bool bOnlyWhenNotInEndState) |
bool | CanReuseCurrentState() const |
void | SetClassReference(UClass * ClassReference) |
UClass * | GetClassReference() const |
void | SetInstanceReference(USMInstance * InstanceReference) |
USMInstance * | GetInstanceReference() const |
void | SetReferencedTemplateName(const FName & Name) |
const FName & | GetReferencedTemplateName() const |
void | SetReferencedBy(USMInstance * FromInstance, FSMStateMachine * FromStateMachine) |
USMInstance * | GetReferencedByInstance() const |
FSMStateMachine * | GetReferencedByStateMachine() const |
void | SetDynamicReferenceVariableName(const FName & InVariableName) |
const FName & | GetDynamicReferenceVariableName() const |
bool | IsDynamicReference() const |
bool | IsNetworked() const |
ISMStateMachineNetworkedInterface * | TryGetNetworkInterfaceIfNetworked() const |
const TMap< FString, FSMState_Base * > & | GetStateNameMap() const |
void | AddActiveState(FSMState_Base * State) |
void | RemoveActiveState(FSMState_Base * State) |
virtual void | ResetGeneratedValues() override |
Protected Functions¶
Name | |
---|---|
virtual void | InitializeFunctionHandlers() override |
virtual void | NotifyInstanceStateHasStarted() override |
void | SetCurrentState(FSMState_Base * ToState, FSMState_Base * FromState, FSMState_Base * SourceState =nullptr) |
void | TryNotifyEndStateReached() |
Public Attributes¶
Name | |
---|---|
uint8 | bHasAdditionalLogic |
uint8 | bReuseCurrentState |
uint8 | bOnlyReuseIfNotEndState |
uint8 | bAllowIndependentTick |
uint8 | bCallReferenceTickOnManualUpdate |
uint8 | bWaitForEndState |
Additional inherited members¶
Public Functions inherited from FSMState_Base
Protected Functions inherited from FSMState_Base
Name | |
---|---|
void | AddOutgoingTransition(FSMTransition * Transition) |
void | AddIncomingTransition(FSMTransition * Transition) |
void | InitializeTransitions() |
void | ShutdownTransitions() |
virtual void | FirePreStartEvents() |
virtual void | FirePostStartEvents() |
Public Attributes inherited from FSMState_Base
Name | |
---|---|
uint16 | bIsRootNode |
uint16 | bAlwaysUpdate |
uint16 | bEvalTransitionsOnStart |
uint16 | bDisableTickTransitionEvaluation |
uint16 | bStayActiveOnStateChange |
uint16 | bAllowParallelReentry |
uint16 | bCanBeEndState |
Protected Attributes inherited from FSMState_Base
Name | |
---|---|
uint16 | bReenteredByParallelState |
uint16 | bCanExecuteLogic |
uint16 | bIsStateEnding |
FSMState_Base * | PreviousActiveState |
FSMTransition * | PreviousActiveTransition |
FDateTime | StartTime |
FDateTime | EndTime |
Friends inherited from FSMState_Base
Name | |
---|---|
struct | FSMTransition(FSMTransition ) |
Public Functions inherited from FSMNode_Base
Name | |
---|---|
const FSMNode_FunctionHandlers * | GetFunctionHandlers() const |
virtual void | UpdateReadStates() |
FSMNode_Base() | |
virtual | ~FSMNode_Base() =default |
FSMNode_Base(const FSMNode_Base & Node) =default | |
bool | HaveGraphFunctionsInitialized() const |
bool | IsInitializedForRun() const |
const FGuid & | GetNodeGuid() const |
void | GenerateNewNodeGuid() |
const FGuid & | GetGuid() const |
FString | GetGuidPath(TMap< FString, int32 > & InOutMappedPaths) const |
FGuid | CalculatePathGuidConst() const |
void | GenerateNewNodeGuidIfNotSet() |
void | SetNodeGuid(const FGuid & NewGuid) |
void | SetOwnerNodeGuid(const FGuid & NewGuid) |
const FGuid & | GetOwnerNodeGuid() const |
void | SetOwnerNode(FSMNode_Base * Owner) |
USMInstance * | GetOwningInstance() const |
void | CreateNodeInstance() |
void | CreateStackInstances() |
void | SetNodeInstanceClass(UClass * NewNodeInstanceClass) |
const TArray< TObjectPtr< USMNodeInstance > > & | GetStackInstancesConst() const |
TArray< TObjectPtr< USMNodeInstance > > & | GetStackInstances() |
USMNodeInstance * | GetNodeInStack(int32 Index) const |
UClass * | GetNodeInstanceClass() const |
bool | IsUsingDefaultNodeClass() const |
void | AddVariableGraphProperty(const FSMGraphProperty_Base_Runtime & GraphProperty, const FGuid & OwningTemplateGuid) |
void | SetNodeName(const FString & Name) |
const FString & | GetNodeName() const |
void | SetTemplateName(const FName & Name) |
FName | GetTemplateName(USMNodeInstance * InNodeInstance =nullptr) const |
void | AddStackTemplateName(const FName & Name, UClass * TemplateClass) |
virtual bool | IsActive() const |
float | GetServerTimeInState() const |
virtual bool | CanExecuteGraphProperties(uint32 OnEvent, const class USMStateInstance_Base * ForTemplate) const |
virtual bool | TryExecuteGraphProperties(uint32 OnEvent) |
void | ExecuteGraphProperties(USMNodeInstance * ForNodeInstance, const FGuid * ForTemplateGuid) |
const TArray< FSMGraphProperty_Base_Runtime * > & | GetGraphProperties() const |
const TMap< FGuid, FSMGraphPropertyTemplateOwner > & | GetTemplateGraphProperties() const |
virtual void | TryResetVariables() |
virtual bool | IsDebugActive() const |
virtual bool | WasDebugActive() const |
virtual void | EditorShutdown() |
FName | GetNodeGuidPropertyName() |
Protected Functions inherited from FSMNode_Base
Name | |
---|---|
virtual void | PrepareGraphExecution() |
virtual void | SetActive(bool bValue) |
void | CreateGraphProperties() |
void | CreateGraphPropertiesForTemplate(USMNodeInstance * Template, const TMap< FGuid, FSMGraphProperty_Base_Runtime * > & MappedGraphPropertyInstances) |
Public Attributes inherited from FSMNode_Base
Name | |
---|---|
bool | bValidateGuids |
float | TimeInState |
bool | bIsInEndState |
bool | bHasUpdated |
int32 | DuplicateId |
FVector2D | NodePosition |
uint8 | bHasInputEvents |
bool | bWasActive |
Protected Attributes inherited from FSMNode_Base
Name | |
---|---|
FSMNode_FunctionHandlers * | FunctionHandlers |
FGuid | Guid |
FGuid | OwnerGuid |
FGuid | PathGuid |
FSMNode_Base * | OwnerNode |
FString | NodeName |
FName | TemplateName |
TArray< FName > | StackTemplateNames |
TArray< TObjectPtr< USMNodeInstance > > | StackNodeInstances |
TArray< TObjectPtr< UClass > > | NodeStackClasses |
TObjectPtr< USMInstance > | OwningInstance |
TObjectPtr< USMNodeInstance > | NodeInstance |
TArray< FSMGraphProperty_Base_Runtime * > | GraphProperties |
TMap< FGuid, FSMGraphPropertyTemplateOwner > | TemplateVariableGraphProperties |
TObjectPtr< UClass > | NodeInstanceClass |
Friends inherited from FSMNode_Base
Name | |
---|---|
class | FSMEditorConstructionManager |
Public Functions Documentation¶
function
FSMStateMachine¶
function
Initialize¶
Initialize specific properties and node instances.
Reimplements: FSMState_Base::Initialize
function
InitializeGraphFunctions¶
Initialize all graph evaluator functions. Must be called from GameThread!
Reimplements: FSMState_Base::InitializeGraphFunctions
function
Reset¶
Resets persistent data.
Reimplements: FSMState_Base::Reset
function
ResetReadStates¶
Reimplements: FSMState_Base::ResetReadStates
function
StartState¶
Sets the state as active and begins execution.
Reimplements: FSMState_Base::StartState
function
UpdateState¶
Runs the update execution.
Reimplements: FSMState_Base::UpdateState
function
EndState¶
virtual bool EndState(
float DeltaSeconds,
const FSMTransition * TransitionToTake =nullptr
) override
Runs the end state execution. Transition to take is so the state knows where it is going only.
Reimplements: FSMState_Base::EndState
function
ExecuteInitializeNodes¶
Reimplements: FSMState_Base::ExecuteInitializeNodes
function
ExecuteShutdownNodes¶
Reimplements: FSMNode_Base::ExecuteShutdownNodes
function
OnStartedByInstance¶
Called when the blueprint owning this node is started.
Reimplements: FSMState_Base::OnStartedByInstance
function
OnStoppedByInstance¶
Called when the blueprint owning this node has stopped.
Reimplements: FSMState_Base::OnStoppedByInstance
function
CalculatePathGuid¶
virtual void CalculatePathGuid(
TMap< FString, int32 > & InOutMappedPaths,
bool bUseGuidCache =false
) override
Calculate the value returned from GetGuid(). Gets all owner nodes and builds a path to this node. Hashes the path and sets PathGuid.
Reimplements: FSMNode_Base::CalculatePathGuid
function
RunConstructionScripts¶
Reimplements: FSMNode_Base::RunConstructionScripts
function
IsInEndState¶
Deprecated:
Use IsStateMachineInEndState() instead.
Reimplements: FSMState_Base::IsInEndState
function
IsEndState¶
If the state itself is an end state.
Reimplements: FSMState_Base::IsEndState
function
IsStateMachine¶
Easy way to check if this state struct is a state machine.
Reimplements: FSMState_Base::IsStateMachine
function
IsNodeInstanceClassCompatible¶
Derived nodes should overload and check for the correct type.
Reimplements: FSMState_Base::IsNodeInstanceClassCompatible
function
GetNodeInstance¶
Return the current node instance. Only valid after initialization and may be nullptr.
Reimplements: FSMNode_Base::GetNodeInstance
function
GetOrCreateNodeInstance¶
Create a node instance on demand if needed. Only required for default node classes. Initialization should be completed before calling.
Reimplements: FSMNode_Base::GetOrCreateNodeInstance
function
CanEverCreateNodeInstance¶
If the node can at some point create a node instance.
Reimplements: FSMNode_Base::CanEverCreateNodeInstance
function
GetDefaultNodeInstanceClass¶
The default node instance class. Each derived node class needs to implement.
Reimplements: FSMState_Base::GetDefaultNodeInstanceClass
function
GetOwnerNode¶
The node directly owning this node. Should be a StateMachine.
Reimplements: FSMNode_Base::GetOwnerNode
function
SetStartTime¶
Set the local start time.
Reimplements: FSMState_Base::SetStartTime
function
SetEndTime¶
Set the local end time.
Reimplements: FSMState_Base::SetEndTime
function
SetServerTimeInState¶
Set the time in state as recorded from the server.
Reimplements: FSMNode_Base::SetServerTimeInState
function
IsStateMachineInEndState¶
If this state machine is in an end state or has no active states.
function
HasStateMachineReachedEndStateForRun¶
If the state machine has reached an end state for its current run. This can be set when an active state's IsEndState() is true, or if the state machine has deactivated all states.
function
AddState¶
Add a state to this State Machine.
function
AddTransition¶
Add a transition to this State Machine.
function
AddInitialState¶
The first state to execute. Even with parallel states there is always a single root entry point.
function
AddTemporaryInitialState¶
These states will replace the initial state, but once started will be cleared.
Parameters:
State
- A non null state will be added to the set as long as it exists within the state machine. A null value is ignored.
function
ClearTemporaryInitialStates¶
Removes all temporary initial states.
function
SetFromTemporaryInitialStates¶
Loads temporary states if not already loaded and start them.
function
ContainsActiveState¶
Checks if the given state is contained within the active states.
function
HasActiveStates¶
Checks if there are any active states.
function
HasTemporaryEntryStates¶
Checks if there any temporary initial states set.
function
GetSingleActiveState¶
The current state of this State Machine. In the event of multiple parallel states the first active state is returned.
function
GetActiveStates¶
Returns a copy of all active states specific to this FSM making it safe for iteration modification.
function
GetAllNestedActiveStates¶
Return a list of all active states recursively searching nested state machines.
function
GetAllNodes¶
Retrieve nodes of all types.
Parameters:
InArgs
- Arguments to filter out nodes.
function
GetAllNodes¶
Deprecated:
Use GetAllNodes() that takes the FGetNodeArgs
arguments instead. bForwardToReference
is no longer supported.
function
GetStates¶
Retrieve nodes of all state types.
function
GetTransitions¶
Retrieve nodes of only transitions.
function
GetEntryStates¶
Returns only the original entry states.
function
GetInitialStates¶
The entry state of this state machine. Returns either the temporary or default. Possible to be greater than 0 when loading from temporary parallel states.
function
GetSingleInitialState¶
Returns either null or the first initial state. Only use this if you know the FSM doesn't have parallel states.
function
GetSingleInitialTemporaryState¶
Returns either null or the first initial temporary state. Only use this if you know the FSM doesn't have parallel states.
function
GetAllNestedInitialTemporaryStates¶
Returns all nested temporary states if they are set.
function
FindState¶
Linear search recursively through all states and state machines.
function
SetNetworkedConditions¶
void SetNetworkedConditions(
TScriptInterface< ISMStateMachineNetworkedInterface > InNetworkInterface,
bool bEvaluateTransitions,
bool bTakeTransitions,
bool bCanExecuteStateLogic
)
Determine how to process transitions and states in different environments.
function
ProcessStates¶
void ProcessStates(
float DeltaSeconds,
bool bForceTransitionEvaluationOnly =false,
const FGuid & InCurrentRunGuid =FGuid(),
const FStateScopingArgs & InStateScopingArgs =FStateScopingArgs()
)
Determine if the current state should be stopped or started or evaluate a transition.
Parameters:
DeltaSeconds
- Time since last update.
bForceTransitionEvaluationOnly
- The update (Tick) logic for a state won't be called unless the state is ending and bAlwaysUpdate is checked. Start and End may still be called.
InCurrentRunGuid
- A guid unique to this call stack. Leave empty, for internal use.
InStateScopingArgs
- Limit state processing to select states.
function
ProcessTransition¶
bool ProcessTransition(
FSMTransition * Transition,
FSMState_Base * SourceState,
FSMState_Base * DestinationState,
const FSMTransitionTransaction * Transaction,
float DeltaSeconds,
FDateTime * CurrentTime =nullptr
)
Attempt to take a transition. Does not evaluate the transition. Returns true if successful.
Parameters:
Transition
- The transition to process.
SourceState
- The original state to transition from.
DestinationState
- the final state to transition to.
Transaction
- A network transaction if one exists. May be null.
DeltaSeconds
- The time in seconds since the last update.
CurrentTime
- The current UTC time. Only utilized in networked environments for recording time stamps.
function
EvaluateAndTakeTransitionChain¶
Evaluate an entire transition chain discovering the path to take. If an entire chain passes then switch to the destination state.
A transition chain is the first path that evaluates to true between two states, consisting of all transitions and conduits that are configured to eval with transitions.
This method fails if the state machine isn't state change authoritative. The destination state won't become active if this state machine doesn't have local state change authority.
If the method passes each transition taken will be replicated in order.
Parameters:
InFirstTransition
- The transition struct, which should be the first part of a transition chain.
Return: True if the chain succeeded evaluation.
function
TakeTransitionChain¶
Take a transition chain. Does not evaluate, but adheres to all normal state change behavior.
Parameters:
InTransitionChain
- The transition chain to take.
Return: True if taken.
function
TryStartState¶
Try starting the given state.
Parameters:
InState
- The state to start.
bOutSafeToCheckTransitions
- [Out] If it is safe to check transitions on this state this frame.
Return: True if the state was started, false if it was already started or cannot start.
function
TryTakeTransitionChain¶
bool TryTakeTransitionChain(
const TArray< FSMTransition * > & InTransitionChain,
float DeltaSeconds,
bool bStateJustStarted =false,
FSMState_Base ** OutDestinationState =nullptr
)
Try taking the given transition chain to the end destination state.
Parameters:
InTransitionChain
- A single transition, or multiple transitions with conduits.
DeltaSeconds
- Delta seconds to apply to ProcessTransition.
bStateJustStarted
- If the source state has started this frame.
OutDestinationState
- [Out] The destination state at the end of chain, only set if the transition chain was taken.
Return: True if the transition chain was taken, false if not.
function
CanProcessExternalTransition¶
External callers should check this before calling ProcessTransition().
function
IsWaitingForUpdate¶
State Machine is currently waiting for a transition update from the server.
function
SetReuseCurrentState¶
When true the current state is reused on exit/reentry. When false the current state is cleared on end and the initial state used on reentry.
function
CanReuseCurrentState¶
Is the current state reused or reset on exit/reentry.
function
SetClassReference¶
function
GetClassReference¶
function
SetInstanceReference¶
function
GetInstanceReference¶
function
SetReferencedTemplateName¶
function
GetReferencedTemplateName¶
function
SetReferencedBy¶
function
GetReferencedByInstance¶
The instance referencing this state machine.
function
GetReferencedByStateMachine¶
The exact state machine referencing this, if any.
function
SetDynamicReferenceVariableName¶
Set a variable name of the owning SMInstance to use for a dynamic class lookup.
function
GetDynamicReferenceVariableName¶
Get a variable name to use with the owning SMInstance for dynamic class lookup.
function
IsDynamicReference¶
If this is a dynamic state machine reference.
function
IsNetworked¶
True only if this FSM is networked.
function
TryGetNetworkInterfaceIfNetworked¶
Find the network interface if one is assigned and active.
function
GetStateNameMap¶
All contained states mapped out by their name, limited to this FSM scope.
function
AddActiveState¶
Forcibly add an active state.
Parameters:
State
- The state to add to the active list.
function
RemoveActiveState¶
Forcibly remove an active state.
Parameters:
State
- The state to remove from the active list.
function
ResetGeneratedValues¶
Reset any values set from state machine generation.
Reimplements: FSMState_Base::ResetGeneratedValues
Protected Functions Documentation¶
function
InitializeFunctionHandlers¶
Map the FunctionHandler pointer. Must be implemented per child struct!
Reimplements: FSMNode_Base::InitializeFunctionHandlers
function
NotifyInstanceStateHasStarted¶
Call the owning instance letting it know this state has started.
Reimplements: FSMState_Base::NotifyInstanceStateHasStarted
function
SetCurrentState¶
void SetCurrentState(
FSMState_Base * ToState,
FSMState_Base * FromState,
FSMState_Base * SourceState =nullptr
)
Switches the current state and notifies the owning instance.
Parameters:
ToState
- The state we should be switching to. May be null.
FromState
- The state we are switching from. If not null it will be removed from the active list if bStayActiveOnStateChange is false.
SourceState
- The original source state we are transitioning from. This can be different from the FromState if transition conduits are involved.
function
TryNotifyEndStateReached¶
Check if an end state has been reached, fire notifications, and traverse any owners that are waiting for an end state.
Public Attributes Documentation¶
variable
bHasAdditionalLogic¶
If this has additional logic associated with it.
variable
bReuseCurrentState¶
The current state is not cleared on end and will be resumed on start.
variable
bOnlyReuseIfNotEndState¶
Don't reuse if the state machine is in an end state.
variable
bAllowIndependentTick¶
Allows the state machine reference to tick on its own.
variable
bCallReferenceTickOnManualUpdate¶
Notifies instance to call tick on manual update. Only valid for references.
variable
bWaitForEndState¶
Wait for an end state to be hit before evaluating transitions or being considered an end state itself.
Private Attributes Documentation¶
variable
NetworkedInterface¶
variable
States¶
variable
Transitions¶
variable
EntryStates¶
The default root entry point.
variable
TemporaryEntryStates¶
Entry states that are temporary and used for loading purposes.
variable
ActiveStates¶
In most cases this should be of size 0 or 1. Greater than 1 implies the sm is configured for multiple active states. Array container needed for exact order when adding parallel states. O(n) operations should be acceptable for average number of active states and only on state changes.
variable
StateNameMap¶
All contained states, mapped by their name.
variable
ProcessingStates¶
Keeps track of states currently processing for the given FSM scope. Helps with possible infinite recursion when using multiple states that can re-enter each other.
variable
ReferencedStateMachineClass¶
variable
ReferencedTemplateName¶
The name of a template archetype to use when constructing a reference. This allows default values be passed into the reference.
variable
DynamicStateMachineReferenceVariable¶
The name of a variable stored on the owning SMInstance that should be used to find the class for this reference.
variable
ReferencedStateMachine¶
This state machine is referencing an instance.
variable
IsReferencedByInstance¶
This state machine is being referenced from an instance.
variable
IsReferencedByStateMachine¶
The state machine referencing this state machine, if any.
variable
TimeSpentWaitingForUpdate¶
Current time spent waiting for an update.
variable
bWaitingForTransitionUpdate¶
Is currently waiting for an update.
variable
bCanEvaluateTransitions¶
Can this instance even evaluate transitions.
variable
bCanTakeTransitions¶
Once evaluated can this instance take the transition.
variable
bHasReachedEndStateForRun¶
True if the state machine has reached an end state at least once and is reset on node initialize.