Class AIStateTransitionNode
Leaf node that transitions the NPC's state machine to a specific BaseAIState. Always returns Success after triggering the transition.
This is the bridge between the behavior tree (decision layer) and the state machine (execution layer). The tree decides "attack", and this node calls ChangeState(BaseAIState, List<ICharacter>) to make it happen.
[CreateAssetMenu(fileName = "New AI State Transition", menuName = "FishMMO/Character/NPC/AI/Behavior Tree/State Transition")]
public class AIStateTransitionNode : AIBehaviorNode
- Inheritance
-
ObjectScriptableObjectAIStateTransitionNode
- Inherited Members
-
ScriptableObject.SetDirty()ScriptableObject.CreateInstance<T>()Object.GetEntityId()Object.GetInstanceID()Object.GetHashCode()Object.InstantiateAsync<T>(T)Object.InstantiateAsync<T>(T, Transform)Object.InstantiateAsync<T>(T, Vector3, Quaternion)Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)Object.Instantiate(Object, Vector3, Quaternion)Object.Instantiate(Object, Vector3, Quaternion, Transform)Object.Instantiate(Object)Object.Instantiate(Object, Scene)Object.Instantiate<T>(T, InstantiateParameters)Object.Instantiate<T>(T, Vector3, Quaternion, InstantiateParameters)Object.Instantiate(Object, Transform)Object.Instantiate<T>(T)Object.Instantiate<T>(T, Vector3, Quaternion)Object.Instantiate<T>(T, Vector3, Quaternion, Transform)Object.Instantiate<T>(T, Transform)Object.Destroy(Object)Object.DestroyImmediate(Object)Object.DontDestroyOnLoad(Object)Object.DestroyObject(Object)Object.FindObjectsOfType<T>()Object.FindObjectsByType<T>(FindObjectsSortMode)Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)Object.FindObjectOfType<T>()Object.FindFirstObjectByType<T>()Object.FindAnyObjectByType<T>()Object.FindFirstObjectByType<T>(FindObjectsInactive)Object.FindAnyObjectByType<T>(FindObjectsInactive)Object.FindObjectsByType<T>()Object.FindObjectsByType<T>(FindObjectsInactive)Object.ToString()Object.nameObject.hideFlags
Fields
TargetState
The AI state to transition to when this node executes.
[Tooltip("The AI state to transition to when this node executes.")]
public BaseAIState TargetState
Field Value
Methods
Evaluate(AIController)
Transitions the NPC to the target state.
public override AINodeResult Evaluate(AIController controller)
Parameters
controllerAIControllerThe AI controller of the evaluating NPC.
Returns
- AINodeResult
Success after transitioning, Failure if no target state is assigned.