Graphic assets and data

Take a closer look at the wikiHow article and consider the various elements that make up each instructional step. We found that each instruction may include the following data:

  • Step number (integer, required)
  • Title (string, required)
  • Text (string, required)
  • Image (PNG or JPG, optional)
  • Video (MP4, optional)
  • AR graphic (unity prefab, optional)

We have prepared a Google sheet with data populated from the wikiHow article, http://tinyurl.com/ChangeTireAR. It contains rows for each instructional step, and columns for each data field, as shown ahead:

The step number starts at 0 (for the introductory start screen), then includes 1 through 14, exactly mimicking the wikiHow article that contains 14 steps. The title and text are borrowed directly from the web page. We then have three optional columns:

  • If the step includes an image (PNG or JPG), we put the base name there
  • If the step includes a video (MP4), we put the base name there
  • If the step includes a Unity prefab, we put the prefab name there

As we will see, we will expect the image and video files to be in an Assets Resources directory for your project, to be built into the production files when we build. Alternatively, we could provide the URL of the asset directly on the wikiHow website and let our app load it from there at runtime. We decided not to implement that in this project to keep things a little simpler, and avoid the chance that wikiHow itself could break our book chapter by changing things after we publish. But it's an easy change in this project, and you get the idea, so you can make similar decisions that are relevant to your own projects.

This app could be refactored to be completely independent of the content, making it a more general mobile and AR instruction manual app, using downloadable content. Unity provides the ability to dynamically add assets to your application at runtime, using AssetBundles. Just about anything can be included such as models, textures, sounds, or animations. Even the instructions, CSV data file, and your graphic prefabs could be updated or replaced over the internet with the careful architecting of your app. See https://docs.unity3d.com/Manual/AssetBundlesIntro.html

In Google sheets, you can export the data as follows:

  1. Go to File | Download As | Comma Separated Files.
  2. Rename it instructionsCSV.csv to be consistent with the instructions given later in this chapter.

We have also included copies of the CSV file, images, and videos in the file package included with this book.

We will go through building the graphic annotations used in the AR views in the next chapter, as we get to it. And these graphics will reside in your project assets as prefabs.

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

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