Creating an Interaction Controller mode
For our user framework, we will make a clever use GameObject with a mode script on it to represent interaction modes. Modes will be enabled (and disabled) by enabling (and disabling) the corresponding objects. We'll organize these objects in a hierarchy, like the UI panels we created in the previous section, but separated to keep the "controllers" apart from the "views," as prescribed by the controller/view software pattern. Presently, we'll include the following modes:
- Startup mode: Active while the AR session is initializing, and then it initiates Scan mode.
- NonAR mode: A placeholder should you want your application to run even if the device does not support AR.
- Scan mode: This prompts the user to scan for trackable features until the AR session is ready, and then it initiates Main mode.
- Main mode: This displays the main menu and handles non-modal interactions.
First, we'll create...