USMTransitionInstance¶
Module: SMSystem
#include <SMTransitionInstance.h>
Inherits from USMNodeInstance, UObject
Description¶
Connect states and define conditions to signal when the active state should end and the next state begin.
Public Functions¶
Protected Functions¶
Name | |
---|---|
virtual bool | CanEnterTransition_Implementation() const |
virtual void | OnTransitionEntered_Implementation() |
virtual void | OnTransitionInitialized_Implementation() |
virtual void | OnTransitionShutdown_Implementation() |
Public Attributes¶
Name | |
---|---|
FOnTransitionEnteredSignature | OnTransitionEnteredEvent |
Protected Attributes¶
Name | |
---|---|
FSMTransitionConnectionValidator | ConnectionRules |
uint8 | bAutoPlaceTransitionIfRulesPass |
uint8 | bShowBackgroundOnCustomIcon |
uint8 | bHideIcon |
float | IconLocationPercentage |
Friends¶
Name | |
---|---|
class | USMGraphNode_TransitionEdge |
Additional inherited members¶
Public Functions inherited from USMNodeInstance
Name | |
---|---|
USMNodeInstance() | |
virtual void | Serialize(FArchive & Ar) override |
virtual UWorld * | GetWorld() const override |
virtual void | BeginDestroy() override |
virtual UObject * | GetContext() const override |
virtual void | NativeInitialize() |
virtual void | NativeShutdown() |
void | OnRootStateMachineStart() |
void | OnRootStateMachineStop() |
void | RunConstructionScript() |
bool | ShouldSkipNativeEditorConstructionScripts() const |
USMInstance * | GetStateMachineInstance(bool bTopMostInstance =false) const |
void | SetOwningNode(FSMNode_Base * Node, bool bInIsEditorExecution =false) |
const FSMNode_Base * | GetOwningNode() const |
T * | GetOwningNodeAs() const |
virtual const FSMNode_Base * | GetOwningNodeContainer() const |
USMStateMachineInstance * | GetOwningStateMachineNodeInstance() const |
TScriptInterface< ISMStateMachineNetworkedInterface > | GetNetworkInterface() const |
virtual float | GetTimeInState() const |
virtual bool | IsInEndState() const |
virtual bool | HasUpdated() const |
bool | IsActive() const |
const FString & | GetNodeName() const |
const FGuid & | GetGuid() const |
UTexture2D * | GetNodeIcon() const |
FVector2D | GetNodeIconSize() const |
FLinearColor | GetNodeIconTintColor() const |
void | EvaluateGraphProperties(bool bTargetOnly =false) |
const FGuid & | GetTemplateGuid() const |
const FVector2D & | GetNodePosition() const |
bool | IsInitialized() const |
bool | IsInitializedAndReadyForInputEvents() const |
FSMGraphProperty * | FindExposedPropertyOverrideByName(const FName & VariableName) const |
virtual void | PostEditChangeProperty(FPropertyChangedEvent & PropertyChangedEvent) override |
bool | WasArrayPropertyModified(const FName & PropertyName) const |
bool | IsNodePinChanging() const |
void | SetDisplayName(FName NewDisplayName) |
void | SetNodeDescriptionText(FText NewDescription) |
FText | GetNodeDescriptionText() const |
void | SetNodeColor(FLinearColor NewColor) |
void | SetUseCustomColor(bool bValue) |
void | SetUseCustomIcon(bool bValue) |
void | SetVariableReadOnly(FName VariableName, bool bSetIsReadOnly) |
void | SetVariableHidden(FName VariableName, bool bSetHidden) |
bool | IsEditorExecution() const |
void | WithExecutionEnvironment(ESMExecutionEnvironment & ExecutionEnvironment) |
TScriptInterface< ISMEditorGraphNodeInterface > | GetOwningEditorGraphNode() const |
void | K2_TryGetOwningEditorGraphNode(TScriptInterface< ISMEditorGraphNodeInterface > & EditorNode, ESMValidEditorNode & IsValidNode) const |
bool | IsInitializationThreadSafe() const |
void | ResetVariables() |
bool | GetResetVariablesOnInitialize() const |
bool | HasCustomColor() const |
const FLinearColor & | GetNodeColor() const |
const FSMNodeDescription & | GetNodeDescription() const |
bool | HasCustomIcon() const |
FString | GetNodeDisplayName() const |
void | SetTemplateGuid(const FGuid & NewTemplateGuid) |
void | SetIsThreadSafe(bool bNewValue) |
void | SetIsEditorThreadSafe(const bool bNewValue) |
bool | GetIsEditorThreadSafe() const |
TEnumAsByte< ESMNodeInput::Type > | GetInputType() const |
int32 | GetInputPriority() const |
bool | GetBlockInput() const |
UInputComponent * | GetInputComponent() const |
FName | GetConstructionScriptFunctionName() |
FName | GetNodeDescriptionPropertyName() |
FName | GetHideFromDropDownIfRulesFailPropertyName() |
Protected Functions inherited from USMNodeInstance
Name | |
---|---|
virtual void | OnRootStateMachineStart_Implementation() |
virtual void | OnRootStateMachineStop_Implementation() |
void | ConstructionScript() |
FSMGraphProperty * | FindOrAddExposedPropertyOverrideByName(const FName & VariableName) |
void | OnPreCompileValidate(USMCompilerLog * CompilerLog) const |
virtual void | OnPreCompileValidate_Implementation(USMCompilerLog * CompilerLog) const |
virtual void | ConstructionScript_Implementation() |
virtual UTexture2D * | GetNodeIcon_Implementation() const |
virtual FVector2D | GetNodeIconSize_Implementation() const |
virtual FLinearColor | GetNodeIconTintColor_Implementation() const |
void | EnableInput() Input. |
void | DisableInput() |
void | OnContextPawnControllerChanged(APawn * Pawn, AController * NewController) |
Public Attributes inherited from USMNodeInstance
Name | |
---|---|
TArray< FSMGraphProperty > | ExposedPropertyOverrides |
uint8 | bEvalDefaultProperties |
uint8 | bAutoEvalExposedProperties |
Protected Attributes inherited from USMNodeInstance
Name | |
---|---|
bool | bSkipNativeEditorConstructionScripts |
TObjectPtr< UTexture2D > | NodeIcon |
FVector2D | NodeIconSize |
FLinearColor | NodeIconTintColor |
bool | bResetVariablesOnInitialize |
FSMNodeDescription | NodeDescription |
FLinearColor | NodeColor |
uint8 | bDisplayCustomIcon |
uint8 | bUseCustomColors |
uint8 | bHideFromDropDownIfRulesFail |
TObjectPtr< UInputComponent > | InputComponent |
TEnumAsByte< ESMNodeInput::Type > | AutoReceiveInput |
int32 | InputPriority |
uint8 | bBlockInput |
Friends inherited from USMNodeInstance
Name | |
---|---|
class | USMGraphNode_StateNode |
struct | FSMNode_Base(FSMNode_Base ) |
class | USMGraphNode_Base |
class | USMGraphK2Node_PropertyNode_Base |
Public Functions Documentation¶
function
USMTransitionInstance¶
function
CanEnterTransition¶
Conditional check to determine if the transition can be taken.
function
OnTransitionEntered¶
Called when this transition has been evaluated and taken.
function
OnTransitionInitialized¶
Called after the state leading to this node is initialized but before OnStateBegin.
function
OnTransitionShutdown¶
Called after the state leading to this node has run OnStateEnd but before it has called its shutdown sequence.
function
GetPreviousStateInstance¶
The state this transition leaves from.
function
GetNextStateInstance¶
The state this transition leads to.
function
GetSourceStateForActiveTransition¶
Return the state that last triggered this transition. This may be a state prior to a transition conduit. This will be valid during OnTransitionEntered().
Return: The first state to trigger this transition chain or null.
function
GetDestinationStateForActiveTransition¶
Return the destination state we are transitioning to or last transitioned to. This may be a state after a transition conduit. This will be valid during OnTransitionEntered().
Return: The final state after the transition chain or null.
function
GetTransitionInfo¶
Return read only information about the owning transition.
function
GetServerTimestamp¶
Return the last server timestamp of this transition. If not networked this won't be set.
function
DoesTransitionPass¶
Evaluates the transition's local graph which usually calls CanEnterTransition() of this instance. This is equivalent to the state machine determining if a transition succeeds.
This is best used from an external caller when checking a transition result.
Return: The transition result.
Warning:
Do NOT call this from within CanEnterTransition() of the instance or the local graph or you may trigger an infinite loop.
function
IsTransitionFromAnyState¶
If the transition was created by an Any State.
Return: True if the transition was copied from an Any State.
function
IsTransitionFromLinkState¶
If the transition was created by a Link State.
Return: True if the transition was copied from a Link State.
function
EvaluateFromManuallyBoundEvent¶
Efficiently evaluate and take the transition immediately. If the transition's CanEnterTransition method returns true the entire transition chain this transition is part of will be evaluated and taken. Super state and parallel transitions will not evaluate when this method is called.
Steps this method performs:
- Enables SetCanEvaluate for this transition.
- Calls EvaluateAndTakeTransitionChain from the owning state machine instance.
- Sets SetCanEvaluate back to the original value.
Use at the end of execution from manually bound events.
Return: True if the transition was taken.
function
GetAllTransitionStackInstances¶
void GetAllTransitionStackInstances(
TArray< USMTransitionInstance * > & TransitionStackInstances
) const
Retrieve all transition instances in the transition stack.
Parameters:
TransitionStackInstances
- [Out] Transition stack instances in their correct order.
function
GetTransitionInStack¶
Retrieve a transition instance from within the transition stack.
Parameters:
Index
- the index of the array.
Return: the transition if the index is valid.
function
GetTransitionInStackByClass¶
USMTransitionInstance * GetTransitionInStackByClass(
TSubclassOf< USMTransitionInstance > TransitionClass,
bool bIncludeChildren =false
) const
Retrieve the first stack instance of a given class.
Parameters:
TransitionClass
- The transition class to search for.
bIncludeChildren
- If children of the given class can be included.
Return: the first transition that matches the class.
function
GetStackOwnerInstance¶
Retrieve the owning node instance of a transition stack. If this is called from the main node instance it will return itself.
function
GetAllTransitionsInStackOfClass¶
void GetAllTransitionsInStackOfClass(
TSubclassOf< USMTransitionInstance > TransitionClass,
TArray< USMTransitionInstance * > & TransitionStackInstances,
bool bIncludeChildren =false
) const
Retrieve all transitions that match the given class.
Parameters:
TransitionClass
- The transition class to search for.
bIncludeChildren
- If children of the given class can be included.
TransitionStackInstances
- [Out] Transition stack instances matching the given class.
function
GetTransitionIndexInStack¶
Retrieve the index of a transition stack instance. O(n).
Parameters:
TransitionInstance
- The transition instance to lookup in the stack.
Return: The index of the transition in the stack. -1 if not found or is the base transition instance.
function
GetTransitionStackCount¶
The total number of transitions in the transition stack.
function
GetAllowedConnections¶
function
ShouldHideIconBackground¶
function
IsIconHidden¶
function
GetIconLocationPercentage¶
function
SetCanEvaluate¶
Sets whether this node is allowed to evaluate or not.
function
GetCanEvaluate¶
Check whether this transition is allowed to evaluate.
function
GetPriorityOrder¶
Public getter for PriorityOrder.
function
SetPriorityOrder¶
Public setter for PriorityOrder. Only valid from the editor construction script.
function
GetRunParallel¶
Public getter for bRunParallel.
function
SetRunParallel¶
Public setter for bRunParallel.
function
GetEvalIfNextStateActive¶
Public getter for bEvalIfNextStateActive.
function
SetEvalIfNextStateActive¶
Public setter for bEvalIfNextStateActive.
function
GetCanEvaluateFromEvent¶
Public getter for bCanEvaluateFromEvent.
function
SetCanEvaluateFromEvent¶
Public setter for bCanEvaluateFromEvent.
function
GetCanEvalWithStartState¶
Public getter for bCanEvalWithStartState.
function
SetCanEvalWithStartState¶
Public setter for bCanEvalWithStartState.
function
GetAutoPlaceTransitionIfRulesPassPropertyName¶
Protected Functions Documentation¶
function
CanEnterTransition_Implementation¶
function
OnTransitionEntered_Implementation¶
function
OnTransitionInitialized_Implementation¶
function
OnTransitionShutdown_Implementation¶
Public Attributes Documentation¶
variable
OnTransitionEnteredEvent¶
Called when this transition has been entered from the previous state.
Protected Attributes Documentation¶
variable
ConnectionRules¶
Define what types of connections are allowed. Default is all.
variable
bAutoPlaceTransitionIfRulesPass¶
Automatically place the transition when a connection rule passes.
variable
bShowBackgroundOnCustomIcon¶
Allow the icon background brush to be displayed for custom icons.
variable
bHideIcon¶
Completely hide the transition icon. If the connection is hovered or selected it will become visible.
variable
IconLocationPercentage¶
Set the position of the icon along the connection.
Private Attributes Documentation¶
variable
PriorityOrder¶
Lower number transitions will be evaluated first.
variable
bRunParallel¶
If this transition evaluates to true it will not prevent the next transition in the priority sequence from being evaluated. This allows the possibility for multiple active states. Transitions from Conduit nodes are not supported.
variable
bEvalIfNextStateActive¶
Should the transition evaluate if already connecting to an active state.
variable
bCanEvaluate¶
If this transition is allowed to evaluate conditionally.
variable
bCanEvaluateFromEvent¶
If this transition can evaluate from auto-bound events.
variable
bCanEvalWithStartState¶
Setting to false forces this transition to never evaluate on the same tick as OnStateBegin. Only used if this transition's from state has bEvalTransitionsOnStart set to true.