FSMTransition¶
Module: SMSystem
#include <SMTransition.h>
Inherits from FSMNode_Base
Description¶
Transitions determine when an FSM can exit one state and advance to the next.
Public Functions¶
| Name | |
|---|---|
| virtual void | UpdateReadStates() override |
| FSMTransition() | |
| virtual void | Initialize(UObject * Instance) override |
| virtual void | InitializeGraphFunctions() override |
| virtual void | Reset() override |
| virtual bool | IsNodeInstanceClassCompatible(UClass * NewNodeInstanceClass) const override |
| virtual UClass * | GetDefaultNodeInstanceClass() const override |
| virtual void | ExecuteInitializeNodes() override |
| virtual void | ExecuteShutdownNodes() override |
| void | TakeTransition() |
| bool | DoesTransitionPass() |
| bool | CanTransitionFromEvent() |
| bool | CanTransition(TArray< FSMTransition * > & Transitions) |
| void | GetConnectedTransitions(TArray< FSMTransition * > & Transitions) const |
| bool | CanEvaluateConditionally() const |
| bool | CanEvaluateFromEvent() const |
| FORCEINLINE FSMState_Base * | GetFromState() const |
| FORCEINLINE FSMState_Base * | GetToState() const |
| void | SetFromState(FSMState_Base * State) |
| void | SetToState(FSMState_Base * State) |
| virtual bool | IsDebugActive() const override |
| virtual bool | WasDebugActive() const override |
| virtual void | ResetGeneratedValues() override |
| bool | CanEvaluateWithStartState(const TArray< FSMTransition * > & TransitionChain) |
| FSMState_Base * | GetFinalStateFromChain(const TArray< FSMTransition * > & TransitionChain) |
| bool | CanChainEvalIfNextStateActive(const TArray< FSMTransition * > & TransitionChain) |
Protected Functions¶
| Name | |
|---|---|
| virtual void | InitializeFunctionHandlers() override |
Public Attributes¶
| Name | |
|---|---|
| int32 | Priority |
| uint16 | bCanEnterTransition |
| uint16 | bCanEnterTransitionFromEvent |
| uint16 | bIsEvaluating |
| uint16 | bCanEvaluate |
| uint16 | bCanEvaluateFromEvent |
| uint16 | bRunParallel |
| uint16 | bEvalIfNextStateActive |
| uint16 | bCanEvalWithStartState |
| uint16 | bAlwaysFalse |
| uint16 | bFromAnyState |
| uint16 | bFromLinkState |
| FGuid | FromGuid |
| FGuid | ToGuid |
| ESMConditionalEvaluationType | ConditionalEvaluationType |
| FDateTime | LastNetworkTimestamp |
| FSMState_Base * | SourceState |
| FSMState_Base * | DestinationState |
| bool | bWasEvaluating |
Additional inherited members¶
Public Functions inherited from FSMNode_Base
| Name | |
|---|---|
| const FSMNode_FunctionHandlers * | GetFunctionHandlers() const |
| FSMNode_Base() | |
| virtual | ~FSMNode_Base() =default |
| FSMNode_Base(const FSMNode_Base & Node) =default | |
| virtual void | OnStartedByInstance(USMInstance * Instance) |
| virtual void | OnStoppedByInstance(USMInstance * Instance) |
| bool | HaveGraphFunctionsInitialized() const |
| bool | IsInitializedForRun() const |
| const FGuid & | GetNodeGuid() const |
| void | GenerateNewNodeGuid() |
| const FGuid & | GetGuid() const |
| virtual void | CalculatePathGuid(TMap< FString, int32 > & InOutMappedPaths, bool bUseGuidCache =false) |
| 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) |
| virtual FSMNode_Base * | GetOwnerNode() const |
| USMInstance * | GetOwningInstance() const |
| void | CreateNodeInstance() |
| void | CreateStackInstances() |
| virtual void | RunConstructionScripts() |
| void | SetNodeInstanceClass(UClass * NewNodeInstanceClass) |
| virtual USMNodeInstance * | GetNodeInstance() const |
| virtual USMNodeInstance * | GetOrCreateNodeInstance() |
| virtual bool | CanEverCreateNodeInstance() const |
| 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 |
| virtual void | SetServerTimeInState(float InTime) |
| 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 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 UpdateReadStates¶
Reimplements: FSMNode_Base::UpdateReadStates
function FSMTransition¶
function Initialize¶
Initialize specific properties and node instances.
Reimplements: FSMNode_Base::Initialize
function InitializeGraphFunctions¶
Initialize all graph evaluator functions. Must be called from GameThread!
Reimplements: FSMNode_Base::InitializeGraphFunctions
function Reset¶
Resets persistent data.
Reimplements: FSMNode_Base::Reset
function IsNodeInstanceClassCompatible¶
Derived nodes should overload and check for the correct type.
Reimplements: FSMNode_Base::IsNodeInstanceClassCompatible
function GetDefaultNodeInstanceClass¶
The default node instance class. Each derived node class needs to implement.
Reimplements: FSMNode_Base::GetDefaultNodeInstanceClass
function ExecuteInitializeNodes¶
Reimplements: FSMNode_Base::ExecuteInitializeNodes
function ExecuteShutdownNodes¶
Reimplements: FSMNode_Base::ExecuteShutdownNodes
function TakeTransition¶
Will execute any transition tunnel logic.
function DoesTransitionPass¶
Execute the graph and return the result. Only determines if this transition passes.
function CanTransitionFromEvent¶
Checks if this transition has been notified it can pass from an event.
function CanTransition¶
Checks the execution tree in the event of conduits.
Parameters:
Transitions- All transitions that pass.
Return: True if a valid path exists.
function GetConnectedTransitions¶
Retrieve all transitions in a chain. If the length is more than one that implies a transition conduit is in use.
Parameters:
Transitions- All transitions connected to this transition, ordered by traversal.
function CanEvaluateConditionally¶
If the transition is allowed to evaluate conditionally. This has to be true in order for the transition to be taken.
function CanEvaluateFromEvent¶
If the transition is allowed to evaluate from an event.
function GetFromState¶
function GetToState¶
function SetFromState¶
Sets the state leading to this transition. This will update the state with this transition.
function SetToState¶
function IsDebugActive¶
Reimplements: FSMNode_Base::IsDebugActive
function WasDebugActive¶
Reimplements: FSMNode_Base::WasDebugActive
function ResetGeneratedValues¶
Reset any values set from state machine generation.
Reimplements: FSMNode_Base::ResetGeneratedValues
function CanEvaluateWithStartState¶
Checks to make sure every transition is allowed to evaluate with the start state.
function GetFinalStateFromChain¶
Get the final state a transition chain will reach. Attempts to find a non-conduit first.
function CanChainEvalIfNextStateActive¶
Checks if any transition allows evaluation if the next state is active.
Protected Functions Documentation¶
function InitializeFunctionHandlers¶
Map the FunctionHandler pointer. Must be implemented per child struct!
Reimplements: FSMNode_Base::InitializeFunctionHandlers
Public Attributes Documentation¶
variable Priority¶
Lower number means this transition is checked sooner.
variable bCanEnterTransition¶
Set from graph execution.
variable bCanEnterTransitionFromEvent¶
Set from graph execution when updated by event.
variable bIsEvaluating¶
Set internally and from auto bound events. True only during evaluation.
variable bCanEvaluate¶
Set from graph execution or configurable from details panel. Must be true for the transition to be evaluated conditionally.
variable bCanEvaluateFromEvent¶
Allows auto-bound events to evaluate.
variable bRunParallel¶
This transition will not prevent the next transition in the priority sequence from being evaluated. This allows the possibility for multiple active states.
variable bEvalIfNextStateActive¶
If the transition should still evaluate if already connecting to an active state.
variable bCanEvalWithStartState¶
Secondary check state machine will make if a state is evaluating transitions on the same tick as Start State.
variable bAlwaysFalse¶
The transition can never be taken conditionally or from an event.
variable bFromAnyState¶
The transition has been created by an Any State.
variable bFromLinkState¶
The transition has been created by a Link State.
variable FromGuid¶
Guid to the state this transition is from. Kismet compiler will convert this into a state link.
variable ToGuid¶
Guid to the state this transition is leading to. Kismet compiler will convert this into a state link.
variable ConditionalEvaluationType¶
The conditional evaluation type which determines the type of evaluation required if any.
variable LastNetworkTimestamp¶
Last recorded timestamp from a network transaction.
variable SourceState¶
Original state transitioning from.
variable DestinationState¶
Destination state transitioning to.
variable bWasEvaluating¶
Helper to display evaluation color in the editor.