Summary

In this chapter, we created a real app that provides a step-by-step, how-to guide for changing a flat tire. We did not build Augmented Reality features into it yet, but we covered a lot of ground, including introducing some great features in Unity, powerful software design patterns, and practical procedures such as importing external data from a database. All very important stuff for developing Augmented Reality apps too.

First, we defined our project requirements to take an existing web-based instruction manual and convert it into a mobile app, with the intent of adding AR capability (in the next chapter). We also introduced a number of software design patterns that professional developers commonly use, not only in Unity applications, and then got a chance to use them ourselves throughout the chapter. These include model-view-controller (MVC), event listeners, and object inheritance.

For the implementation, we started by building the user interface (view) using Unity's UI system, and constructing a functional hierarchy of canvas, panels, and UI elements. We explored Unity's tools for layouts of these elements.

Then we wrote our data model classes that manage the instruction content, including loading the data from an external CSV file. Then, we wrote a game controller that manages the state of the app and ensured the data is displayed on the screen. As the project progressed, we added content, including body text, images, and videos.

Along the way, we refactored the code to use Unity events and abstract object classes. We showed how this improves the architecture and facilitates extending the system with more content types.

In the next chapter, we will extend the project by adding AR content and taking it from 2D to 3D. It will take advantage of all the groundwork we did here in part one, so we can focus on the AR capabilities as we build up the application.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset