Summary
In this chapter, we developed a framework for building AR applications and saved it as a template we can use for projects in this book. The framework provides a state-machine structure for implementing modes and identifying the conditions when to transition to a different mode. The framework also offers a controller-view design pattern where, when a mode is active, its corresponding UI is visible, keeping the mode control objects separate from the UI view objects.
For the framework template, we implemented four modes: Startup mode, Scan mode, Main mode, and NonAR mode, along with four UI panels: Startup UI, Scan UI, Main UI, and NonAR UI. Scan mode uses the onboarding UX assets from the AR Foundation Demos project to prompt the user to scan for trackable features and report problems with detection and the AR session.
In the next chapter, I will demonstrate the use of this framework with a simple demo project and then build upon the framework more extensively in subsequent...