Part 5: Configure State Machine
State Machine feature is used forto transitioningconfigure a Music State and a Navigation State. Transitions are created from one state to another.the Inother. ourBehaviors example,are weset willup haveusing athe powerful Fusion Editor. These behaviors trigger the configured transitions and set GroupNodes visible and invisible.
Configuring the State Machine
Using the State Machine Editor configure the already existing GlobalStateMachine to incorporate 2 states: Music state and aNavigation. NavigationConnect state.these Thestates with transitions betweenin both directions. Define these twotransitions areto be triggered by pressing the MusicTextButton_Music and Navigation buttons in the Menu section.TextButton_Navigation.
- In Solution Explorer navigate to the GlobalStateMachine which can be found following the path below. Double-click the GlobalStateMachine.
- The State Machine Editor will be opened and GlobalStateMachine will be displayed.
- GlobalStateMachine consists of an Initial State (circle) and a State (rectangle) called "State" and a transition from the Initial State to the State.
Solution Explorer Path Solution > State Machines > GlobalStateMachine
- In State Machine Editor add another state by dragging a State from the upper right toolbar and dropping it into the State Machine diagram below the already existing state.
- A new state "State_1" will be created in the State Machine Editor.

- A new state "State_1" will be created in the State Machine Editor.
- In State Machine Editor add a transition from "State" to "State_1" and another transition from "State_1" to "State". To do this drag a Transition from the toolbar onto the outgoing state (e.g. State) then click onto the second state (e.g. State_1).
- 2 Transitions will be added from State to State_1 and back

- 2 Transitions will be added from State to State_1 and back
- In State Machine Editor select the State and State_1 one by one. In the Properties panel's [General] section change their Name properties according to the table below.
- In State Machine Editor you can see that the states have been renamed.
Target State "State" Target State "State_1" General > Name Music Navigation
- In State Machine Editor you can see that the states have been renamed.
To easily configure this property lock the Properties panel clicking the padlock icon in the panel's top right corner. Drag the desired node from the Scene Tree onto the input field of the property to be configured. Release the mouse button when the mouse cursor is changed. The input field will be filled. Finally click the padlock icon again to unlock the Properties panel.
Sender [Event Filter]
Music -> Navigation
IVI_Sample > IVI_Sample > Menu_button > TextButton_NavigationNavigation -> Music
IVI_Sample > IVI_Sample > Menu_button > TextButton_Menu
Configuring Behaviors using Fusion
Here we are using Fusion to define the actions to be performed when entering and exiting the Music and Navigation State. In the Fusion diagram of TextButton_Music and TextButton_Navigation we connect a HandleControlState behavior.
- While the state "Music" is selected in the State Machine Editor click on the [Fusion...] button on the bottom left.
- Fusion will be opened, displaying the Fusion node "Music".
- The displayed Fusion node offers 2 behavior connectors: one for [On Entry Actions] and one for [On Exit Actions].

- In the [Music] Fusion Node drag the [On Entry Actions] connector circle to the right and release the mouse.
- A Select Behavior dialog will be opened.
- This dialog has an input field on top and a list of behaviors organized as a tree on the bottom.
- This list of behaviors is similar to the one in the Toolbox panel's [Behaviors] section.
- In the Select Behavior dialogue find the "Enable Rendering" behavior and double-click it.
- In Fusion a new [Enable Rendering] node is created, which is connected to the Slider's [On Entry Actions] connector.
Use the dialogue's input field and start typing "Enable Rendering". While you are typing, the list of behaviors decreases as the content of the input field serves as a filter.
- In Fusion a new [Enable Rendering] node is created, which is connected to the Slider's [On Entry Actions] connector.
- In Fusion configure the [Enable Rendering] node according to the table below.
- The [Enable Rendering] node is fully configured.
- Whenever GlobalStateMachine enters the state "Music", the GroupNode "Music" will get visible.
Music Node On Entry Actions > EnableRendering TargetNode IVI_Sample > IVI_Sample > Music Visible TRUE
- Repeat similar steps to create an [EnableRendering] Fusion Node for the [Music] node's [On Exit Action] connector. Configure this new [EnableRendering] node according to the table below.
- The [Enable Rendering] node is fully configured.
- Whenever GlobalStateMachine exits the state "Music", the GroupNode "Music" will get invisible.
Music Node On Exit Actions > EnableRendering TargetNode IVI_Sample > IVI_Sample > Music Visible FALSE 
- In State Machine Editor select the [Navigation] state, switch to Fusion and configure a similar [On Entry Action] and [On Exit Action]. Necessary configuration details are given in the table below.
- The [Navigation] State has been configured similar to the [Music] State.
- Whenever GlobalStateMachine enters the state "Navigation", the GroupNode "Navigation" will get visible.
- Whenever GlobalStateMachine exits the state "Navigation", the GroupNode "Navigation" will get invisible.
Navigation Node On Enter Actions > EnableRendering TargetNode IVI_Sample > IVI_Sample > Navigation Visible FALSE NavigationNode On Exit Actions > EnableRendering TargetNode IVI_Sample > IVI_Sample > Navigation Visible FALSE
- Fusion will be opened, displaying the TextButton_Music's Fusion node with a Behaviors connector.
Scene Tree Path IVI_Sample > IVI_Sample > Menu_button > TextButton_Music
- The Select Behaviors dialog will be opened
- A new Fusion node [Handle Control State] will be created.
- A new Fusion node [Handle Control State] will be created.
Scene Tree Path IVI_Sample > IVI_Sample > Menu_button > TextButton_Navigation
Check
Next,Use wethe willPlayer configureto howcheck thesethe transitionconfigured aretransitions triggered.between Select each TransitionMusic and set the displayed Properties as shown below.Navigation.

Now, all configuration is done. Please save

windows will open, and you can see that the simulation display shows the IVI_Sample scene.
In the simulation display click the Navigation menu button. The Navigation GroupNode will be displayed.
In the simulation display click the Music
