Chapter 7 Part 2 | Configure Unity State Graph

Users will edit the Unity state graph to ensure it is configured to build the app (covered in Chapter 8 of this tutorial).

Unity Hotkeys

Opening State Graph

7.1 An overview of accessing the state graph, navigating the UI, and the purpose of using state graphs.
View of all the modules and transitions in the state graph
Step-by-step process

Explaining Visual Script Structure

7.2 The 3 states(enter, exit, and transition state) for the modules are explained.
Step-by-step process

Scenes and Variables

7.3 Open the AlienInvasion scene and create the required scene variables.
Hierarchy window - displays every GameObject in a Scene, such as models, cameras, or prefabs.
GameObject - every object in your game is a GameObject, from characters and collectible items to lights, cameras and special effects.
Step-by-step process

Saving Your Progress

7.4 Save the Unity project periodically throughout the process (CTRL + S).
Step-by-step process

Starting To Build State Graph Interactions

7.5 The first connection will initiate the progress tracking for the student, unlocking the ability to progress on all the child modules.
Setup for first connection
Step-by-step process

Setting Up Login and The Document Module

7.6 Add the variables for the login and document to display for the user.
Canvas - the area that all UI elements should be inside.
Setup for Alien Invasion Document enter/exit state
Setup for Alien Invasion Document transition state
Enter fullscreen in the State Graph window by double-clicking in the window or clicking the fullscreen button in the top right corner of the window.
Step-by-step process
If variables are not showing up in the graph then users should verify they are in the AlienInvasion scene.

Setting Up Event Set Module

7.7 Modify the states in the modules within the event sets to properly track the progress.
Step-by-step process

Setting Up Investigate UFO Event Set

7.8 Add scene variables to display the UI to investigate the UFO and to trigger the event set.
Setup a variable to display canvas UI
Setup variables to trigger the investigate UFO event set
Step-by-step process

Setting Up Place Power Cell Event Set

7.9 Add scene variables to display the UI to place the power cells and trigger the event set.
Setup for adding the ability to place the power cells
Setup for the power cell placement event set
Step-by-step process

Adding The Assessment Module

7.10 Add the subgraph and canvas scene variables to play through the assessment.
Setup for playing the animations and starting the assessment
Setup for closing the assessment UI with a canvas button
Step-by-step process

Adding Ending To App

7.11 Adjust the connection for the last module to guarantee the end of the app will run.
Setup for ending the app
Step-by-step process

Note For App Variables

7.12 Verify the application variables for course name and class name match the names created on MOTAR in an earlier chapter.
Step-by-step process

Interaction Overview

7.13 Review how the state graph connects the app's progress to the MOTAR course.
Step-by-step process