We are going to add an AppStateManager to the project. Let's begin by making the object and then write the component script:
- In the root of the Hierarchy, create an empty game object, and name it AppStateManager.
-
In the Scripts folder create a new C# script named AppStateManager and drag it onto AppStateManager as a component.
Open the AppStateManager script for editing, as follows:
File: AppStateManager.cs
First, we'll declare the appState and a large set of public variables that will be explained as we use them:
using UnityEngine; using UnityEngine.Events; using UnityEngine.UI; using Vuforia; public class AppStateManager : MonoBehaviour { private AppStates appState; //Vuforia scripts that are used to get the state ...