Arbor 3: FSM & BT Graph Editor 3.7.2

Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Properties | List of all members
ArborFSMInternal Class Reference

Internal class of Arbor.ArborFSM. More...

Inheritance diagram for ArborFSMInternal:

## Public Member Functions
int | IndexOfStateLinkHistory (StateLink stateLink)
| Retrieve the index in the history that transited by the specified StateLink. More...
State | GetStateFromIndex (int index)
| Get State from index. More...
int | GetStateIndex (State state)
| Get State index. More...
State | GetStateFromID (int stateID)
| Gets Arbor.State from the state identifier. More...
State | GetState (StateLink stateLink)
| Gets Arbor.State from the StateLink. More...
State | CreateState (int nodeID, bool resident)
| Create state. More...
State | CreateState (bool resident)
| Create state. More...
State | CreateState ()
| Create state. More...
State | FindState (string stateName)
| Search state by name. More...
State[] | FindStates (string stateName)
| Search state by name. More...
State | FindStateContainsBehaviour (StateBehaviour behaviour)
| Acquisition of states StateBehaviour belongs. More...
bool | DeleteState (State state)
| Delete state. More...
StateLinkRerouteNode | CreateStateLinkRerouteNode (Vector2 position, int nodeID, Color lineColor)
| Create StateLinkRerouteNode. More...
StateLinkRerouteNode | CreateStateLinkRerouteNode (Vector2 position, int nodeID)
| Create StateLinkRerouteNode. More...
StateLinkRerouteNode | CreateStateLinkRerouteNode (Vector2 position, Color lineColor)
| Create StateLinkRerouteNode. More...
StateLinkRerouteNode | CreateStateLinkRerouteNode (Vector2 position)
| Create StateLinkRerouteNode. More...
void | Play ()
| Start playing the state machine. More...
void | Stop ()
| Stopping playback of the state machine. More...
void | Pause ()
| Pause playback of the state machine. More...
void | Resume ()
| Resume playing state machine. More...
void | ExecuteUpdate (bool autoExecuteLateUpdate=false)
| Perform an update. More...
void | ExecuteLateUpdate ()
| Perform an LateUpdate. More...
bool | Transition (State nextState, TransitionTiming transitionTiming)
| State transition More...
bool | Transition (State nextState, bool immediateTransition)
| State transition More...
bool | Transition (State nextState)
| State transition. More...
bool | Transition (int nextStateID, TransitionTiming transitionTiming)
| State transition More...
bool | Transition (int nextStateID, bool immediateTransition)
| State transition More...
bool | Transition (int nextStateID)
| State transition. More...
bool | Transition (StateLink nextStateLink, TransitionTiming transitionTiming)
| State transition More...
bool | Transition (StateLink nextStateLink, bool immediateTransition)
| State transition More...
bool | Transition (StateLink nextStateLink)
| State transition. More...
void | SendTrigger (string message, SendTriggerFlags flags=allSendTrigger)
| Sending of trigger More...
Public Member Functions inherited from NodeGraph
Node | GetNodeFromIndex (int index)
| Get Node from index. More...
Node | GetNodeFromID (int nodeID)
| Gets Arbor.Node from the node identifier. More...
CalculatorNode | GetCalculatorFromIndex (int index)
| Get CalculatorNode from index. More...
int | GetCalculatorIndex (CalculatorNode calculator)
| Get CalculatorNode index. More...
CalculatorNode | GetCalculatorFromID (int calculatorID)
| Gets Arbor.CalculatorNode from the calculator identifier. More...
CalculatorNode | CreateCalculator (int nodeID, System.Type calculatorType)
| Create calculator. More...
CalculatorNode | CreateCalculator (System.Type calculatorType)
| Create calculator. More...
CalculatorNode | FindCalculator (Calculator calculator)
| Acquisition of CalculatorNodes Calculator belongs. More...
bool | DeleteCalculator (CalculatorNode calculatorNode)
| Delete calculator. More...
CommentNode | GetCommentFromIndex (int index)
| Get CommentNode from index. More...
int | GetCommentIndex (CommentNode comment)
| Get CommentNode index. More...
CommentNode | GetCommentFromID (int commentID)
| Gets Arbor.CommentNode from the comment identifier. More...
CommentNode | CreateComment (int nodeID)
| Create comment. More...
CommentNode | CreateComment ()
| Create comment. More...
void | DeleteComment (CommentNode comment)
| Delete comment. More...
GroupNode | GetGroupFromIndex (int index)
| Get GroupNode from index. More...
GroupNode | CreateGroup (int nodeID)
| Create group. More...
GroupNode | CreateGroup ()
| Create group. More...
void | DeleteGroup (GroupNode group)
| Delete group. More...
GroupNode | GetGroupFromID (int groupID)
| Gets Arbor.GroupNode from the group identifier. More...
DataBranchRerouteNode | CreateDataBranchRerouteNode (Vector2 position, System.Type type, int nodeID)
| Create DataBranchRerouteNode. More...
DataBranchRerouteNode | CreateCalculatorBranchRerouteNode (Vector2 position, System.Type type, int nodeID)
| Create DataBranchRerouteNode. More...
DataBranchRerouteNode | CreateDataBranchRerouteNode (Vector2 position, System.Type type)
| Create DataBranchRerouteNode. More...
DataBranchRerouteNode | CreateCalculatorBranchRerouteNode (Vector2 position, System.Type type)
| Create DataBranchRerouteNode. More...
void | DeleteDataBranchRerouteNode (DataBranchRerouteNode rerouteNode)
| Delete DataBranchRerouteNode. More...
void | DeleteCalculatorBranchRerouteNode (DataBranchRerouteNode rerouteNode)
| Delete DataBranchRerouteNode. More...
virtual void | OnValidateNodes ()
| Called when the node is changed. More...
bool | DeleteNode (Node node)
| Delete node. More...
Node | FindNodeContainsBehaviour (NodeBehaviour behaviour)
| Acquisition of nodes NodeBehaviour belongs. More...
DataBranch | GetDataBranchFromIndex (int index)
| Get DataBranch from index. More...
DataBranch | GetCalculatorBranchFromIndex (int index)
| Get DataBranch from index. More...
int | GetDataBranchIndex (DataBranch branch)
| Get DataBranch index. More...
int | GetCalculatorBranchIndex (DataBranch branch)
| Get DataBranch index. More...
DataBranch | GetDataBranchFromID (int branchID)
| Gets Arbor.DataBranch from the calculator branch identifier. More...
DataBranch | GetCalculatorBranchFromID (int branchID)
| Gets Arbor.DataBranch from the calculator branch identifier. More...
DataBranch | ConnectDataBranch (int branchID, int inputNodeID, Object inputObj, DataSlot inputSlot, int outputNodeID, Object outputObj, DataSlot outputSlot)
| Connect DataSlot. More...
DataBranch | ConnectCalculatorBranch (int branchID, int inputNodeID, Object inputObj, DataSlot inputSlot, int outputNodeID, Object outputObj, DataSlot outputSlot)
| Connect DataSlot. More...
DataBranch | ConnectDataBranch (int inputNodeID, Object inputObj, DataSlot inputSlot, int outputNodeID, Object outputObj, DataSlot outputSlot)
| Connect DataSlot. More...
DataBranch | ConnectCalculatorBranch (int inputNodeID, Object inputObj, DataSlot inputSlot, int outputNodeID, Object outputObj, DataSlot outputSlot)
| Connect DataSlot. More...
void | DisconnectDataBranch (Object obj)
| Method to be used internally. More...
void | DeleteDataBranch (DataBranch branch)
| Delete DataBranch. More...
void | DeleteCalculatorBranch (DataBranch branch)
| Delete DataBranch. More...
bool | CheckLoopDataBranch (int inputNodeID, Object inputObj, int outputNodeID, Object outputObj)
| Check if DataBranch is looping. More...
bool | CheckLoopCalculatorBranch (int inputNodeID, Object inputObj, int outputNodeID, Object outputObj)
| Check if DataBranch is looping. More...
delegate void | NodeGraphCallback (NodeGraph nodeGraph)
| Delegate for NodeGraph callback More...
virtual void | OnDestroy ()
| This function is called when MonoBehaivour will be destroyed. More...
void | DestroySubComponents (bool callback=true)
| Method to be used internally. More...
override string | ToString ()
| Convert graph to string (for debugging). More...
void | OnPoolResume ()
| Called when resuming. More...
void | OnPoolSleep ()
| Called when stored in the pool. More...

## Public Attributes
bool | playOnStart = true
| Flag to be played at the start. More...
UpdateSettings | updateSettings = new UpdateSettings()
| Settings related to updating. More...
Public Attributes inherited from NodeGraph
string | graphName = ""
| The Graph name. More...
DebugInfiniteLoopSettings | debugInfiniteLoopSettings = new DebugInfiniteLoopSettings()
| Debug setting of infinite loop More...

## Static Public Attributes
const SendTriggerFlags | allSendTrigger = (SendTriggerFlags)(-1)
| All flags in SendTriggerFlags are valid More...

## Protected Member Functions
override bool | OnDeleteNode (Node node)
| Delete node. More...
override void | OnValidate ()
| See MonoBehaviour.OnValidate. More...
sealed override void | OnReset ()
| Reset or create callback. More...
sealed override void | OnRegisterNodes ()
| Register nodes More...

## Properties
PlayState | playState`[get]`
| Play state More...
string | fsmName`[get, set]`
| The FSM name. More...
int | startStateID`[get]`
| Gets the start state identifier. More...
State | currentState`[get]`
| Gets Arbor.State of the current. More...
State | prevTransitionState`[get]`
| Prev state More...
State | nextTransitionState`[get]`
| Next state More...
State | nextState`[get]`
| Gets the transition reserved Arbor.State. More...
State | reservedState`[get]`
| Gets the transition reserved Arbor.State. More...
StateLink | reservedStateLink`[get]`
| Gets the transition reserved Arbor.StateLink. More...
int | stateCount`[get]`
| Get a count of State. More...
StateLinkRerouteNodeList | stateLinkRerouteNodes`[get]`
| StateLinkRerouteNode List More...
State[] | states`[get]`
| Gets all of Arbor.State. More...
Properties inherited from NodeGraph
NodeGraph | parentGraph`[get]`
| Parent graph More...
NodeGraph | rootGraph`[get]`
| Root graph More...
Object | ownerBehaviourObject`[get, set]`
| Object of NodeBehaviour own this graph More...
NodeBehaviour | ownerBehaviour`[get, set]`
| NodeBehaviour is the owner of this graph More...
ParameterContainerInternal | parameterContainer`[get]`
| The ParameterContainer assigned in this graph More...
string | displayGraphName`[get]`
| Display name of the node graph. More...
DebugInfiniteLoopSettings | currentDebugInfiniteLoopSettings`[get]`
| Current infinite loop debug setting. More...
bool | external`[get]`
| Flag instantiated from external graph More...
int | nodeCount`[get]`
| Get a count of Node. More...
int | calculatorCount`[get]`
| Get a count of CalculatorNode. More...
CalculatorNode[] | calculators`[get]`
| Gets all of Arbor.CalculatorNode. More...
int | commentCount`[get]`
| Get a count of CommentNode. More...
CommentNode[] | comments`[get]`
| Gets all of Arbor.CommentNode. More...
int | groupCount`[get]`
| Get a count of GroupNode. More...
DataBranchRerouteNodeList | dataBranchRerouteNodes`[get]`
| DataBranchRerouteNode list More...
DataBranchRerouteNodeList | calculatorBranchRerouteNodes`[get]`
| DataBranchRerouteNode list More...
int | dataBranchCount`[get]`
| Get a count of DataBranch. More...
int | calculatorBranchCount`[get]`
| Get a count of DataBranch. More...
DataBranch[] | calculatorBranchies`[get]`
| Gets all of Arbor.DataBranch. More...
bool | isDeserialized`[get]`
| Returns whether or not deserialization has been done. More...

## Additional Inherited Members
Static Public Member Functions inherited from NodeGraph
static NodeGraph | FindGraph (string name)
| Get the NodeGraph that in the scene with the name. More...
static NodeGraph | FindGraph (string name, System.Type type)
| Get the NodeGraph that in the scene with the name. More...
static T | FindGraph< T > (string name)
| Get the NodeGraph that in the scene with the name. More...
static NodeGraph[] | FindGraphs (string name)
| Get the NodeGraph of the same name that is in the scene. More...
static NodeGraph[] | FindGraphs (string name, System.Type type)
| Get the NodeGraph of the same name that is in the scene. More...
static T[] | FindGraphs< T > (string name)
| Get the NodeGraph of the same name that is in the scene. More...
static NodeGraph | FindGraph (GameObject gameObject, string name)
| Get NodeGraph in the name that has been attached to the GameObject. More...
static NodeGraph | FindGraph (GameObject gameObject, string name, System.Type type)
| Get NodeGraph in the name that has been attached to the GameObject. More...
static T | FindGraph< T > (GameObject gameObject, string name)
| Get NodeGraph in the name that has been attached to the GameObject. More...
static NodeGraph[] | FindGraphs (GameObject gameObject, string name)
| Get the NodeGraph of the same name that is attached to a GameObject. More...
static NodeGraph[] | FindGraphs (GameObject gameObject, string name, System.Type type)
| Get the NodeGraph of the same name that is attached to a GameObject. More...
static T[] | FindGraphs< T > (GameObject gameObject, string name)
| Get the NodeGraph of the same name that is attached to a GameObject. More...
static NodeGraph | Create (GameObject gameObject, System.Type classType)
| Create NodeGraph More...
static GraphType | Create< GraphType > (GameObject gameObject)
| Create NodeGraph More...
static NodeGraph | Instantiate (NodeGraph sourceGraph, NodeBehaviour ownerBehaviour, bool usePool=false)
| Instantiate NodeGraph More...
static GraphType | Instantiate< GraphType > (GraphType sourceGraph, NodeBehaviour ownerBehaviour, bool usePool=false)
| Instantiate NodeGraph More...
static void | Destroy (NodeGraph nodeGraph)
| Destroy NodeGraph More...
Events inherited from NodeGraph
System.Action | onAfterDeserialize
| Callback after deserialization More...
NodeGraphCallback | destroyCallback
| Call back when being destroyed More...
NodeGraphCallback | stateChangedCallback
| Call back when the state changes More...

## Detailed Description

Internal class of Arbor.ArborFSM.

To actually attach to GameObject is to use the Arbor.ArborFSM.

## Member Function Documentation

## ◆ CreateState() [1/3]

State CreateState | ( |  | ) |

Create state.

Returns
  The created state.

## ◆ CreateState() [2/3]

State CreateState | ( | bool | resident | ) |

Create state.

Parameters

  resident | Resident whether flags.

Returns
  The created state.

## ◆ CreateState() [3/3]

State CreateState | ( | int | nodeID,
|  | bool | resident
| ) |  |

Create state.

Parameters

  nodeID | Node ID
  resident | Resident whether flags.

Returns
  The created state. If the node ID is not unique, return null without creating it.

## ◆ CreateStateLinkRerouteNode() [1/4]

StateLinkRerouteNode CreateStateLinkRerouteNode | ( | Vector2 | position | ) |

Create StateLinkRerouteNode.

Parameters

  position | Node position

Returns
  The created StateLinkRerouteNode

## ◆ CreateStateLinkRerouteNode() [2/4]

StateLinkRerouteNode CreateStateLinkRerouteNode | ( | Vector2 | position,
|  | Color | lineColor
| ) |  |

Create StateLinkRerouteNode.

Parameters

  position | Node position
  lineColor | Line Color

Returns
  The created StateLinkRerouteNode

## ◆ CreateStateLinkRerouteNode() [3/4]

StateLinkRerouteNode CreateStateLinkRerouteNode | ( | Vector2 | position,
|  | int | nodeID
| ) |  |

Create StateLinkRerouteNode.

Parameters

  position | Node position
  nodeID | Node ID

Returns
  The created StateLinkRerouteNode

## ◆ CreateStateLinkRerouteNode() [4/4]

StateLinkRerouteNode CreateStateLinkRerouteNode | ( | Vector2 | position,
|  | int | nodeID,
|  | Color | lineColor
| ) |  |

Create StateLinkRerouteNode.

Parameters

  position | Node position
  nodeID | Node ID
  lineColor | Line Color

Returns
  The created StateLinkRerouteNode

## ◆ DeleteState()

bool DeleteState | ( | State | state | ) |

Delete state.

Parameters

  state | State that you want to delete.

Returns
  true if deleted

## ◆ ExecuteLateUpdate()

void ExecuteLateUpdate | ( |  | ) |

Perform an LateUpdate.

Please call this method at any timing when UpdateSettings.type is Manual.

## ◆ ExecuteUpdate()

void ExecuteUpdate | ( | bool | autoExecuteLateUpdate = `false` | ) |

Perform an update.

Please call this method at any timing when UpdateSettings.type is Manual.

Parameters

  autoExecuteLateUpdate | Flag for ExecuteLateUpdate automatically

## ◆ FindState()

State FindState | ( | string | stateName | ) |

Search state by name.

Parameters

  stateName | The name of the search state.

Returns
  Found state. Return null if not.

## ◆ FindStateContainsBehaviour()

State FindStateContainsBehaviour | ( | StateBehaviour | behaviour | ) |

Acquisition of states StateBehaviour belongs.

Parameters

  behaviour | StateBehaviour

Returns
  States StateBehaviour belongs. Return null if not.

## ◆ FindStates()

State [] FindStates | ( | string | stateName | ) |

Search state by name.

Parameters

  stateName | The name of the search state.

Returns
  Array of found state.

## ◆ GetState()

State GetState | ( | StateLink | stateLink | ) |

Gets Arbor.State from the StateLink.

Parameters

  stateLink | StateLink

Returns
  Found Arbor.State. Returns null if not found.

## ◆ GetStateFromID()

State GetStateFromID | ( | int | stateID | ) |

Gets Arbor.State from the state identifier.

Parameters

  stateID | The state identifier.

Returns
  Found Arbor.State. Returns null if not found.

## ◆ GetStateFromIndex()

State GetStateFromIndex | ( | int | index | ) |

Get State from index.

Parameters

  index | Index

Returns
  State

## ◆ GetStateIndex()

int GetStateIndex | ( | State | state | ) |

Get State index.

Parameters

  state | State

Returns
  Index. If not, it returns -1.

## ◆ IndexOfStateLinkHistory()

int IndexOfStateLinkHistory | ( | StateLink | stateLink | ) |

Retrieve the index in the history that transited by the specified StateLink.

Parameters

  stateLink | StateLink to acquire

Returns
  Index of history. -1 is not eligible. Larger values indicate older transitions.

## ◆ OnDeleteNode()

override bool OnDeleteNode | ( | Node | node | ) |
| protected virtual

Delete node.

Parameters

  node | The node to delete

Returns
  Returns true if deleted, false otherwise.

Implements NodeGraph.

## ◆ OnRegisterNodes()

sealed override void OnRegisterNodes | ( |  | ) |
| protected virtual

Register nodes

Implements NodeGraph.

## ◆ OnReset()

sealed override void OnReset | ( |  | ) |
| protected virtual

Reset or create callback.

Reimplemented from NodeGraph.

## ◆ OnValidate()

override void OnValidate | ( |  | ) |
| protected virtual

See MonoBehaviour.OnValidate.

Reimplemented from NodeGraph.

## ◆ Pause()

void Pause | ( |  | ) |

Pause playback of the state machine.

## ◆ Play()

void Play | ( |  | ) |

Start playing the state machine.

## ◆ Resume()

void Resume | ( |  | ) |

Resume playing state machine.

## ◆ SendTrigger()

void SendTrigger | ( | string | message,
|  | SendTriggerFlags | flags = `allSendTrigger`
| ) |  |

Sending of trigger

Parameters

  message | Message to be sent
  flags | Trigger flag to send

## ◆ Stop()

void Stop | ( |  | ) |

Stopping playback of the state machine.

## ◆ Transition() [1/9]

bool Transition | ( | int | nextStateID | ) |

State transition.

Timing to actually transition current frame last (when LateUpdate).

Parameters

  nextStateID | State ID for the transition destination.

Returns
  Whether or not the transition

## ◆ Transition() [2/9]

bool Transition | ( | int | nextStateID,
|  | bool | immediateTransition
| ) |  |

State transition

Parameters

  nextStateID | State ID for the transition destination.
  immediateTransition | Whether or not to transition immediately. If false I will transition to the end of the current frame (when LateUpdate).

Returns
  Whether or not the transition

## ◆ Transition() [3/9]

bool Transition | ( | int | nextStateID,
|  | TransitionTiming | transitionTiming
| ) |  |

State transition

Parameters

  nextStateID | State ID for the transition destination.
  transitionTiming | Transition timing.

Returns
  Whether or not the transition

## ◆ Transition() [4/9]

bool Transition | ( | State | nextState | ) |

State transition.

Timing to actually transition current frame last (when LateUpdate).

Parameters

  nextState | Destination state.

Returns
  Whether or not the transition

## ◆ Transition() [5/9]

bool Transition | ( | State | nextState,
|  | bool | immediateTransition
| ) |  |

State transition

Parameters

  nextState | Destination state.
  immediateTransition | Whether or not to transition immediately. If false I will transition to the end of the current frame (when LateUpdate).

Returns
  Whether or not the transition

## ◆ Transition() [6/9]

bool Transition | ( | State | nextState,
|  | TransitionTiming | transitionTiming
| ) |  |

State transition

Parameters

  nextState | Destination state.
  transitionTiming | Transition timing.

Returns
  Whether or not the transition

## ◆ Transition() [7/9]

bool Transition | ( | StateLink | nextStateLink | ) |

State transition.

Timing to actually transition current frame last (when LateUpdate).

Parameters

  nextStateLink | The destination of transition.

Returns
  Whether or not the transition

## ◆ Transition() [8/9]

bool Transition | ( | StateLink | nextStateLink,
|  | bool | immediateTransition
| ) |  |

State transition

Parameters

  nextStateLink | The destination of transition.
  immediateTransition | Whether or not to transition immediately. If false I will transition to the end of the current frame (when LateUpdate).

Returns
  Whether or not the transition

## ◆ Transition() [9/9]

bool Transition | ( | StateLink | nextStateLink,
|  | TransitionTiming | transitionTiming
| ) |  |

State transition

Parameters

  nextStateLink | The destination of transition.
  transitionTiming | Transition timing.

Returns
  Whether or not the transition

## Member Data Documentation

## ◆ allSendTrigger

const SendTriggerFlags allSendTrigger = (SendTriggerFlags)(-1)
| static

All flags in SendTriggerFlags are valid

## ◆ playOnStart

bool playOnStart = true

Flag to be played at the start.

## ◆ updateSettings

UpdateSettings updateSettings = new UpdateSettings()

Settings related to updating.

## Property Documentation

## ◆ currentState

State currentState
| get

Gets Arbor.State of the current.

Arbor.State of the current.

## ◆ fsmName

string fsmName
| get set

The FSM name.

It is used for identification and retrieval when there is more than one FSM in one GameObject.

## ◆ nextState

State nextState
| get

Gets the transition reserved Arbor.State.

Transition reserved Arbor.State.

## ◆ nextTransitionState

State nextTransitionState
| get

Next state

## ◆ playState

PlayState playState
| get

Play state

## ◆ prevTransitionState

State prevTransitionState
| get

Prev state

## ◆ reservedState

State reservedState
| get

Gets the transition reserved Arbor.State.

Transition reserved Arbor.State.

## ◆ reservedStateLink

StateLink reservedStateLink
| get

Gets the transition reserved Arbor.StateLink.

Transition reserved Arbor.StateLink.

## ◆ startStateID

int startStateID
| get

Gets the start state identifier.

The start state identifier.

## ◆ stateCount

int stateCount
| get

Get a count of State.

## ◆ stateLinkRerouteNodes

StateLinkRerouteNodeList stateLinkRerouteNodes
| get

StateLinkRerouteNode List

## ◆ states

State [] states
| get

Gets all of Arbor.State.

Array of Arbor.State.