# Behavior Tabs {{< image-center src="images/2_DevMode/menus/tools/behavior_debug/behaviours_5_views.png" alt="Example Of The Different Behaviour Views" >}} The [Behaviors Debug](../../behaviors-debug-window/) window is mainly comprised of the different **View Tabs** that can be used to see and debug the contents of a model behavior XML file. The available view tabs will change depending on the XML that is chosen from the [Global Filters](../../behaviors-debug-window/#global-filters) section of the window, however you can open/close any of them - whether appropriate or not - from the [View](../../behaviors-debug-window/#view) menu. Below you can find information on each of the tabs. ### Logs {{< image-center src="images/2_DevMode/menus/tools/behavior_debug/views/views_1_logs_1.png" alt="The Logs Tab View" >}} From this tab view you can revise model verification and the XML parsing logs (per file). These logs will display information, warnings, and errors related to the parsing of the XML file(s). You can filter these logs by type using the corresponding check boxes at the top, or you filter using a specific word or phrase. Note that you can hover the mouse over an error or warning to get more information on where that event occurred, getting more context in the process. If the XML has any models associated with it, then you will have a **Model Loading Info** tab, which shows all the missing nodes and animation warnings related to the model. Note that you can you can right-click the tab header to filter the output, as well as copy the entire output to the clipboard. ### Inspector / Inspector Side Bar {{< image-center src="images/2_DevMode/menus/tools/behavior_debug/views/views_3_inspector_1.png" alt="The Inspector Tab View" >}} The inspector is a convenient view that gives you a quick and easy-to-parse overview of any given **component** structure. The view is made up of two parts, the component access **list** on the left, and the **data overview** on the right. The component **list** may not be visible, in which case it can be shown using the [View](../../behaviors-debug-window/#view) menu **Inspector Side Bar** option (this can also be used to hide the list if you require more space). Clicking any option in the component access list will open the corresponding data overview with the component path as the filter. Note that you can filter the list view by using a string in the input field at the top (which can be cleared using the {{< button "Clear" />}} button). Listed components can be inspected using the following different methods: - By selecting the component from the list on the left. - By selecting the component in the list from the [History](../../behaviors-debug-window/#history) menu. - By clicking on a **child** or **parent** component name in the data overview on the right. - By right clicking and selecting the option "Open in inspector" in the data overview list on the right (when appropriate). - By hovering over a mouserect in the simulation view and then pressing {{< input "Ctrl" />}} + {{< input "G" />}} on the keyboard.   ### Components {{< image-center src="images/2_DevMode/menus/tools/behavior_debug/views/views_4_components_1.png" alt="The Components Tab View" >}} The component tab overview is a quick way to access any relevant information about all the components. This view can be filtered by either component name or by node name using the input fields at the top (and you can use the {{< button "Clear" />}} button to remove the filter). Each component listed can be expanded to show the following information:   - **ID**: This shows the component ID as defined in XML.   - **Path**: This shows the full component ID, formulated as a "path" of concatenated ID's from the component root.   - **Parent Component**: The parent component of the selected component (if any).   - **Child Component(s)**: Then child or children component(s) of the selected component (if any).   Note that you can **right-click** on any component to get the following pop-up menu: {{< image-center src="images/2_DevMode/menus/tools/behavior_debug/views/views_4_components_2.png" alt="RMB Menu On A Component" >}} From this menu you can open the component in the [Inspector](#inspector--inspector-side-bar) view, or set the component name as a filter. ### Animations {{< image-center src="images/2_DevMode/menus/tools/behavior_debug/views/views_5_animations_1.png" alt="The Animations View Tab" >}} The animation view tab is a quick way to access any relevant information about an animation from the model behavior. This view can be filtered by either component name or by animation name using the input fields at the top (and you can use the {{< button "Clear" />}} button to remove the filter). Beside the filters you have the following two buttons: - {{< image-icon src="images/2_DevMode/menus/tools/behavior_debug/views/anim_icon_1.png" alt="Edit SimObject Icon">}} **Audio Events** - This button can be used to quickly filter the events list to only show: - when the icon is **blue** only animations that have audio events. - when the icon is **red** only animations that have *no* audio events. - when the icon is **grey** then this is the default view with no audio event filter applied. - {{< image-icon src="images/2_DevMode/menus/tools/behavior_debug/views/anim_icon_2.png" alt="Edit SimObject Icon">}} **glTF Animations** - This button can be used to quickly filter the events list to only show: - when the icon is **blue** only animations that have a corresponding glTF animation. - when the icon is **red** only animations that have *no* corresponding glTF animation. - when the icon is **grey** then this is the default view with no glTF animation filter applied.   Clicking on any listed component will expand it's information and present the following data: - **Common Data**: This shows data that is common to all animation nodes. - **Autoplay** - Will be *True* if the animation plays automatically, or *False* otherwise. - **Random Start** - Will be *True* if the animation start percentage is random, or *False* otherwise. - **Blend Weight** - This shows the animation blend weight from 0.0 to 1.0. - **Framerate** - This shows the animation frame rate.   - **Events**: This shows any *events* associated with the animation, as defined by the `` element. - **SoundEvent** - This shows `` data. - **EffectEvent** - This shows `` data.   - **Interpolation Data**: This section shows a number of data points related to the way the animation will be interpolated. - **Accumulate** - This will be *True* if the value is accumulated, or *False* if it is set. - **Wrap** - This will be *True* if the animation should wrap (ie: going over the given range will carry over to the other extreme of the range), or *False* otherwise. - **Lag** - This gives the current animation lag, clamped to the maximum delta an animation can execute per second. For example, a value of 300 means 300 units/second maximum, and so to move from 0 to 100 the animation will take `(1/300) * 100s = 1/3` of a second. - **Value Range** - This shows the range of the computed value. The current value will be divided by the range to drive the animation percentage.   - **Code**: Here you can see the governing code for the animation. You can *right-click* on the code to get the option to copy it to the clipboard, or to open it in the [Code Editor](../code-editor/) (this will additionally update any dynamic parameters - see the [Note On Dynamic Parameters](../../behaviors-debug-window/#note-on-dynamic-parameters)).   - **Current Value**: This shows the current value over the range, with the corresponding percentage value in parenthesis. You can right click this field to be shown a slider that can then be used to set an override for the value (useful for testing). ![The Override Position Slider](images/2_DevMode/menus/tools/behavior_debug/views/views_5_animations_2.png)If you change the value in this way, there will be a button showing {{< button "Clear Force Value" />}}, which can be used to remove the forced value and return it to the current simulation state. ### Mouserects {{< image-center src="images/2_DevMode/menus/tools/behavior_debug/views/views_6_mouserect_1.png" alt="The Mouserects View Tab" >}} The mouserect data overview is a quick way to access any relevant information about a mouserect. This view can be filtered by either component name or by node name using the input fields at the top (and you can use the {{< button "Clear" />}} button to remove the filter).   - **Mouse Flags**: Here you get a list of the different mouse flags that the mouserect will react to.   - **Temporary Lock Flags**: This lists the mouse flags which will trigger a lock when not using the locked control scheme.   - **Cursor**: This shows the different cursor status for the node. - **Default**: the default cursor is being displayed. - **Position (Up/Down/Left/Right)**: the cursor to display at the given position relative to the node. If it says "None" then this is unused. - **Center Radius**: The radius around the node for which the cursor is considered centered.   - **Lock Enabled**: If *True* then the lock should be enabled for this mouserect, and if *False* then lock is disabled.   - **Disabled**: This will be *True* if the mouserect is disabled, or *False* otherwise.   - **Disabled In VR**: This will be *True* if the mouserect is disabled while in VR, or *False* otherwise.   - **Disabled With Motion Controllers**: This will be *True* if the mouserect is disabled while using motion controllers, or *False* otherwise.   - **Highlight Node ID**: This shows the ID of the Node to highlight when the cursor hovers over this mouserect.   - **Code**: Here you can see the governing code for the mouserect. You can *right-click* on the code to get the option to copy it to the clipboard, or to open it in the [Code Editor](../code-editor/) (this will additionally update any dynamic parameters - see the [Note On Dynamic Parameters](../../behaviors-debug-window/#note-on-dynamic-parameters)).   - **Tooltip Title**: This shows the localised tooltip title.   - **Tooltip Table**: This is a table showing information about the tooltip for the mouserect. - **Description**: Localized tooltip description. - **Value**: The tooltip value field. - **InputEvent Value**: The value of the corresponding input event.     ### Material {{< image-center src="images/2_DevMode/menus/tools/behavior_debug/views/views_7_materials_1.png" alt="The Materials View Tab" >}} The materials overview is a quick way to access relevant information about a material being used by the selected component. This view can be filtered by either component name or by node name using the input fields at the top (and you can use the {{< button "Clear" />}} button to remove the filter). Each component with a material will show the following details:   - **Common Data**: This section shows some common data that all materials all have in common. - **Override base emissive**: If set to *True*, the original node emissive has been normalized, if *False* it has not.   - **Materials Data**: This will list the material emissives of the node currently loaded. Values shown will be RGB values, in nits.   - **Interpolation Data**: This section shows a number of data points related to the way the material animation will be interpolated. - **Accumulate** - This will be *True* if the value is accumulated, or *False* if it is set. - **Wrap** - This will be *True* if the animation should wrap (ie: going over the given range will carry over to the other extreme of the range), or *False* otherwise. - **Lag** - This gives the current animation lag, clamped to the maximum delta an animation can execute per second. For example, a value of 300 means 300 units/second maximum, and so to move from 0 to 100 the animation will take `(1/300) * 100s = 1/3` of a second. - **Value Range** - This shows the range of the computed value. The current value will be divided by the range to drive the animation percentage.   - **Code**: Here you can see the governing code for the animation. You can *right-click* on the code to get the option to copy it to the clipboard, or to open it in the [Code Editor](../code-editor/) (this will additionally update any dynamic parameters - see the [Note On Dynamic Parameters](../../behaviors-debug-window/#note-on-dynamic-parameters)).   - **Current Value**: This shows the current value over the range, with the corresponding percentage value in parenthesis. You can right click this field to be shown a slider that can then be used to set an override for the value (useful for testing). {{< image-center src="images/2_DevMode/menus/tools/behavior_debug/views/views_7_materials_2.png" alt="The Override Position Slider" >}} If you change the value in this way, there will be a button showing {{< button "Clear Force Value" />}}, which can be used to remove the forced value and return it to the current simulation state.   - **Photogrammetric Scaled Value**: This is the end value after the scaled photogrammetric value has been applied (the value depends on the time of day). ### Visibility {{< image-center src="images/2_DevMode/menus/tools/behavior_debug/views/views_8_visibility_1.png" alt="The Visibility View Tab" >}} The visibility codes overview is a quick way to access any relevant information about the visibility of a node. This view can be filtered by either component name or by node name using the input fields at the top (and you can use the {{< button "Clear" />}} button to remove the filter). Each component with a visibility data will show the following details:   - **Common Data**: This section shows some common data that all nodes with visibility calls have in common. - **Default Visible**: True if the node is visible by default - **Update Once**: True is the code is only executed once   - **Interpolation Data**: This section shows a number of data points related to the way the visibility will be interpolated. - **Accumulate** - This will be *True* if the value is accumulated, or *False* if it is set. - **Wrap** - This will be *True* if the animation should wrap (ie: going over the given range will carry over to the other extreme of the range), or *False* otherwise. - **Lag** - This gives the current animation lag, clamped to the maximum delta an animation can execute per second. For example, a value of 300 means 300 units/second maximum, and so to move from 0 to 100 the animation will take `(1/300) * 100s = 1/3` of a second. - **Value Range** - This shows the range of the computed value. The current value will be divided by the range to drive the animation percentage.   - **Code**: Here you can see the governing code for the visibility. You can *right-click* on the code to get the option to copy it to the clipboard, or to open it in the [Code Editor](../code-editor/) (this will additionally update any dynamic parameters - see the [Note On Dynamic Parameters](../../behaviors-debug-window/#note-on-dynamic-parameters)).   - **Current Value**: This shows the current value over the range, with the corresponding percentage value in parenthesis. You can right click this field to be shown a slider that can then be used to set an override for the value (useful for testing). {{< image-center src="images/2_DevMode/menus/tools/behavior_debug/views/views_8_visibility_2.png" alt="The Override Position Slider" >}} If you change the value in this way, there will be a button showing {{< button "Clear Force Value" />}}, which can be used to remove the forced value and return it to the current simulation state. ### Updates {{< image-center src="images/2_DevMode/menus/tools/behavior_debug/views/views_9_visibility_1.png" alt="The Updates View Tab" >}} The updates data overview is a quick way to access any relevant information about the update code for a component. This view can be filtered by component name using the input field at the top (and you can use the {{< button "Clear" />}} button to remove the filter). Each component with code will show the following details:   - **Common Data**: This section shows some common data for the nodes with code. - **Update once** - If this is shown, then the update code is only run once. - **Update Frequency** - If this is shown, then the update code runs at the given frequency. - **InteractionFlags** - This set of flags show their interaction model for which the update will run.   - **Last update**: If the node has run this code, then this will show the time since the last update occurred.   - **Code**: Here you can see the governing code for the node. You can *right-click* on the code to get the option to copy it to the clipboard, or to open it in the [Code Editor](../code-editor/) (this will additionally update any dynamic parameters - see the [Note On Dynamic Parameters](../../behaviors-debug-window/#note-on-dynamic-parameters)).   - **`Exec`**: You can click this button to execute the code immediately. ### VFX {{< image-center src="images/2_DevMode/menus/tools/behavior_debug/views/views_10_vfx_1.png" alt="The VFX View Tab" >}} The VFXs data overview is a quick way to access any relevant information about VFX that are assigned to a node. This view can be filtered by component name using the input field at the top (and you can use the {{< button "Clear" />}} button to remove the filter). Each component with code will show the following details:   - **Common Data**: This section shows some common data for the nodes with VFX. - **GUID** - This shows the {{< glossterm >}}guid{{< /glossterm >}} of the VFX, which can be copied to the clipboard using right-click. - **MinEmissionTime** - Here you can see the minimum time the VFX has to be emitting when activated. If this is not applicable to the VFX (ie: it is a burst effect), then a value of -1 will be shown. - **ContactPoint** - This shows the ID value of the contact point that the VFX is attached to. If no contact point is used then -1 will be shown.   - **Location Data**: This section shows location information for where the VFX is being spawned, as defined by the `` element. - **Offset** - This is the offset position fom the origin or the contact point, expressed a an XYZ vector. - **Rotation** - This is the offset rotation fom the origin or the contact point, expressed using the {{< glossterm >}}pbh{{< /glossterm >}} format.   - **Graph Parameters**: This section is shown when the VFX node has `` defined, and it shows the various parameters and their values.   - **Enabled Entries**: This section lists the type of ground contact that will spawn the VFX (see `` for more information).   - **VisualEffect handle**: Here you can find information about the current status of the VFX. - **Valid** - This will show *True* if the VFX handle is valid, ie: it has been spawned in the world. - **Playing** - This will show *True* if the VFX is currently playing. - **DoneEmitting** - This will show *True* if the VFX is finished emitting. ### Input Events {{< image-center src="images/2_DevMode/menus/tools/behavior_debug/views/views_11_inputevents_1.png" alt="The InputEvents View Tab" >}} The Input Events data overview is a quick way to access any relevant information about the different defined input events. This view can be filtered by event name using the input field at the top (and you can use the {{< button "Clear" />}} button to remove the filter). Each component with code will show the following details:   - **Value**: The very first set of input fields are the current input event value, and the units it should be consider using. Both these are settable for debugging purposes.   - **ValueCode**: The value code is the code that will be executed whenever the input event runs the `` code or receives an event (``, ``, or ``). If you right click on the shown code, you will get the following options: - **Copy To Clipboard** - **Format code** (this simply prettifies the code a bit) - **Open in [Code Editor](../code-editor/)** (this will additionally update any dynamic parameters - see the [Note On Dynamic Parameters](../../behaviors-debug-window/#note-on-dynamic-parameters)).   - **Data**: This section offers a more expansive view of the input event data such as the code for each event and the associated tooltips info. It can have the following sub-sections: - **``**, **``**, or **``**: For each of the events the code will be shown, and you can right-click the snippet to edit it in the [Code Editor](../code-editor/) (this will additionally update any dynamic parameters - see the [Note On Dynamic Parameters](../../behaviors-debug-window/#note-on-dynamic-parameters)). Each event will also display any associated parameters, showing the last value the parameter held, which will be updated in realtime. - **``**: For the initialisation event the code will be shown, and you can right-click the snippet to edit it in the [Code Editor](../code-editor/). - **``**: This section will show information about tooltips associated with the input event. - **Default** and **Lockable** interactions: These can be expanded to show the associated icon, tooltip and flags for each one. - Additionally the view shows the tooltip description and value. If the tooltip is dynamic, this will be the current one.   - **Binding(s)**: This sub-section will list all of the available bindings by name. For each binding all the information that pertains to it - such as the event it's targeting (Inc Dec, Set) and the parameters it is setting - will be shown, and there will be an input field that can be used to set a specific value if required for debugging (add the value then press {{< button "Execute" />}}). For dynamic parameters - such as a toggle event - the code and value evaluated is shown instead of an input field, and you can right-click on the code to open it in the [Code Editor](../code-editor/). Any edited code can then be executed by pressing the {{< button "Execute" />}} button. Using the {{< button "Execute" />}} button works the same way as triggering them directly from a mouserect interaction. Bindings are all colour coded as follows: - Orange bindings are the *base* bindings for Inc, Dec and Set events (if used directly). - White bindings (no background) are aliases. - Blue bindings are event IDs.   - **Variable(s)**: Here the view lists all of the variables being watched by the debug view, and any changes in a variables value will trigger the Init code to run again. Variables will be coloured as follows: - Orange variables are local variables - Green variables are SimVars ### Variables {{< image-center src="images/2_DevMode/menus/tools/behavior_debug/views/views_12_variables_1.png" alt="The Variables View Tab" >}} The variables view list all *global*, *local*, and *component* variables used by the SimObject being debugged (these can be either *get* or *set* in the behavior XML). Each listed variable has its own input field so that you can edit the value for debugging and testing. ### Tooltips {{< image-center src="images/2_DevMode/menus/tools/behavior_debug/views/views_13_tooltips_1.png" alt="The Tooltips View Tab" >}} This view shows a list of all of the tooltips currently in use by the selected behavior SimObject. You can right-click an ID to copy it to your clipboard. Note that an ID displayed in red means that it wasn't found, and you will need to make sure that the tooltip has been created and the package it belongs to has been rebuilt.