October 2017
Intermediate to advanced
548 pages
13h 23m
English
Let's see this in action before populating our list with real data. We just need to make a few changes to the InstructionsController script. Namely, the controller will be responsible for telling the model to load its data, get the current instruction step, and display it on the screen.
At the top of the class, we will add variables for the titleText and bodyText UI objects. These will be populated using the Inspector. We also have a currentInstructionModel variable.
File: InstructionsController.cs public class InstructionsController : MonoBehaviour { public Text stepText; public Text titleText; public Text bodyText; private int currentStep; private InstructionModel currentInstructionModel = ...Read now
Unlock full access