FSMState¶
Module: SMSystem
#include <SMState.h>
Inherits from FSMState_Base, FSMNode_Base
Description¶
State nodes that can execute Blueprint logic.
Public Functions¶
Name | |
---|---|
FSMState() | |
virtual void | Initialize(UObject * Instance) override |
virtual void | InitializeGraphFunctions() override |
virtual void | Reset() override |
virtual void | ExecuteInitializeNodes() override |
virtual void | ExecuteShutdownNodes() override |
virtual bool | StartState() override |
virtual bool | UpdateState(float DeltaSeconds) override |
virtual bool | EndState(float DeltaSeconds, const FSMTransition * TransitionToTake =nullptr) override |
virtual bool | TryExecuteGraphProperties(uint32 OnEvent) override |
virtual void | OnStartedByInstance(USMInstance * Instance) override |
virtual void | OnStoppedByInstance(USMInstance * Instance) override |
Protected Functions¶
Name | |
---|---|
virtual void | InitializeFunctionHandlers() override |
Additional inherited members¶
Public Functions inherited from FSMState_Base
Name | |
---|---|
virtual void | UpdateReadStates() override |
virtual void | ResetReadStates() |
FSMState_Base() | |
virtual bool | IsNodeInstanceClassCompatible(UClass * NewNodeInstanceClass) const override |
virtual UClass * | GetDefaultNodeInstanceClass() const override |
const TArray< FSMTransition * > & | GetOutgoingTransitions() const |
const TArray< FSMTransition * > & | GetIncomingTransitions() const |
void | GetAllTransitionChains(TArray< FSMTransition * > & OutTransitions) const |
virtual bool | GetValidTransition(TArray< TArray< FSMTransition * > > & Transitions) |
virtual bool | IsEndState() const |
virtual bool | IsInEndState() const |
virtual bool | HasUpdated() const |
virtual bool | IsStateMachine() const |
virtual bool | IsConduit() const |
bool | IsRootNode() const |
float | GetActiveTime() const |
void | SetCanExecuteLogic(bool bValue) |
bool | CanExecuteLogic() const |
virtual bool | CanExecuteGraphProperties(uint32 OnEvent, const USMStateInstance_Base * ForTemplate) const override |
bool | CanEvaluateTransitionsOnTick() const |
void | SortTransitions() |
void | SetTransitionToTake(const FSMTransition * Transition) |
const FSMTransition * | GetTransitionToTake() const |
void | SetPreviousActiveState(FSMState_Base * InPreviousState) |
void | SetPreviousActiveTransition(FSMTransition * InPreviousTransition) |
FSMState_Base * | GetPreviousActiveState() const |
FSMTransition * | GetPreviousActiveTransition() const |
void | NotifyOfParallelReentry(bool bValue =true) |
bool | HasBeenReenteredFromParallelState() const |
bool | IsStateEnding() const |
const FDateTime & | GetStartTime() const |
const FDateTime & | GetEndTime() const |
virtual void | SetStartTime(const FDateTime & InStartTime) |
virtual void | SetEndTime(const FDateTime & InEndTime) |
double | GetStartCycle() const |
virtual void | ResetGeneratedValues() override |
Protected Functions inherited from FSMState_Base
Name | |
---|---|
void | AddOutgoingTransition(FSMTransition * Transition) |
void | AddIncomingTransition(FSMTransition * Transition) |
void | InitializeTransitions() |
void | ShutdownTransitions() |
virtual void | NotifyInstanceStateHasStarted() |
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 |
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 bool | IsNodeInstanceClassCompatible(UClass * NewNodeInstanceClass) const |
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 |
virtual UClass * | GetDefaultNodeInstanceClass() 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 |
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() |
virtual void | ResetGeneratedValues() |
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
FSMState¶
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
ExecuteInitializeNodes¶
Reimplements: FSMState_Base::ExecuteInitializeNodes
function
ExecuteShutdownNodes¶
Reimplements: FSMNode_Base::ExecuteShutdownNodes
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
TryExecuteGraphProperties¶
Execute desired graph properties for the given event.
Reimplements: FSMNode_Base::TryExecuteGraphProperties
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
Protected Functions Documentation¶
function
InitializeFunctionHandlers¶
Map the FunctionHandler pointer. Must be implemented per child struct!
Reimplements: FSMNode_Base::InitializeFunctionHandlers