Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revisionLast revisionBoth sides next revision | ||
quick:debug [2018/05/29 11:36] – pedro | quick:debug [2020/09/03 09:28] – pedro | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | < | ||
# Debug Mode Quick Start Guide | # Debug Mode Quick Start Guide | ||
Line 12: | Line 13: | ||
The Behavior Bricks editor enters debug mode automatically when playing a scene in the Unity editor, substituting the `Behavior` tab of the Behavior Bricks editor with the `Debug` tab, as shown in the Figure: | The Behavior Bricks editor enters debug mode automatically when playing a scene in the Unity editor, substituting the `Behavior` tab of the Behavior Bricks editor with the `Debug` tab, as shown in the Figure: | ||
- | {{ : | + | ![]( : |
To watch the execution flow for a particular behavior tree of a given entity in the scene, you must open the behavior tree in the Behavior Bricks editor, and select the entity to debug in the Unity´s `Hierarchy` panel. Alternatively, | To watch the execution flow for a particular behavior tree of a given entity in the scene, you must open the behavior tree in the Behavior Bricks editor, and select the entity to debug in the Unity´s `Hierarchy` panel. Alternatively, | ||
- | {{ : | + | ![]( : |
Once the behavior and the entity have been selected, the state of each node is depicted by changing the color of its bounding box: | Once the behavior and the entity have been selected, the state of each node is depicted by changing the color of its bounding box: | ||
Line 25: | Line 26: | ||
- Grey when in suspended state (`Repeat` and `Priority Selector` in the Figure) | - Grey when in suspended state (`Repeat` and `Priority Selector` in the Figure) | ||
- | {{ : | + | ![]( : |
From the `Debug` tab is also possible to pause the execution of an entity behavior by clicking on the `Pause` button next to the entity name. Keep in mind that the pause will start after it finishes its current task. Once you have pressed the pause button you can either `Resume` the behavior or `Tick` it so the behavior receives one update call and then return to pause. | From the `Debug` tab is also possible to pause the execution of an entity behavior by clicking on the `Pause` button next to the entity name. Keep in mind that the pause will start after it finishes its current task. Once you have pressed the pause button you can either `Resume` the behavior or `Tick` it so the behavior receives one update call and then return to pause. | ||
- | {{ : | + | ![]( : |
It is also possible to pause and resume all the entities that use a given behavior by pressing the corresponding `Resume all` or `Pause all` button. | It is also possible to pause and resume all the entities that use a given behavior by pressing the corresponding `Resume all` or `Pause all` button. | ||
Line 37: | Line 38: | ||
While in debug mode it is possible to inspect the value of the parameters of a running tree or the parameters of a particular node in a running tree. The `Blackboard` tab shows the parameters of the selected tree in a given entity (previously selected in the `Debug` tab): | While in debug mode it is possible to inspect the value of the parameters of a running tree or the parameters of a particular node in a running tree. The `Blackboard` tab shows the parameters of the selected tree in a given entity (previously selected in the `Debug` tab): | ||
- | {{ : | + | ![]( : |
and for a running tree, by clicking on one of its node it is possible to inspect the node parameters: | and for a running tree, by clicking on one of its node it is possible to inspect the node parameters: | ||
- | {{ : | + | ![]( : |
- | With this feature you can pause the execution of the game when a node for a concrete behavior tree of a specific entity reach one of the following states: | + | ### Breakpoints |
- | - Success | + | Behavior Bricks also features a simple type of breakpoint that allows to pause the execution of the scene whenever a given condition is reached in a particular node of a behavior tree in a given entity. |
- | - Failed | + | |
- | - Aborted | + | |
- | - Launched | + | |
- | To add a breakpoint you just need to right click in a node and select `Add Breakpoint`: | + | In order to set a breakpoint you just need to right click in a node and select `Add Breakpoint`, and this can be done while in edit or play mode of the Unity editor: |
- | ![Adding a breakpoint](images/ | + | ![]( :images: |
- | You can configure what events the breakpoint should be triggered | + | Then, in the `Node` tab, it is possible to select the event(s) triggered |
- | ![Breakpoint events](images/ | + | ![]( :images: |
- | In case all events are unmarked | + | Finally, for the breakpoint |
- | ![Disabled | + | A node with a breakpoint |
- | Remeber that a breakpoint can only be triggered when: | + | ![]( :images: |
- | - You are on Play Mode | + | </markdown> |
- | - Behavior Bricks Editor is open | + | |
- | - A valid entity is selected | + | |
- | - The behavior that contains the node with the breakpoint attached is open, but you don´t need the behavior to be the active tab. | + | |
- | + | ||
- | ![Triggered breakpoint](images/DebugModeQuickStartGuide/ | + | |