Defining InstructionElement

To help organize our code in a clean object-oriented structure, we will define UI elements which will all inherit from an InstructionElement class. This will be the base class. Therefore, we should label the class as abstract. This means that new instances of InstructionElement cannot be created directly, only one of its subclasses.

We shall also require that each subclass of InstructionElement must provide its own implementation of an InstructionUpdate function, which gets the instruction-step data it can use to update its specific UI element. So, in our abstract class, we also declare an abstract function for InstructionUpdate:

  1. In Unity, in the Assets/HowToChangeATire/Scripts/ folder create a subfolder named ...

Get Augmented Reality for Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.