Returning to Unity, we need to tell the component about our Step Text UI element.
- Select Game Controller in Hierarchy.
- Locate the Step Text object (Main Canvas/ Nav Panel/ Step Text) and drag it onto the Step Text slot of the Instructions Controller.
If you press Play in Unity now, the nav bar text should read Step 0 (instead of Step #).
Now let's wire up the buttons to our controller:
- In Hierarchy, select the Next Button (Instruction Canvas/ Nav Panel/ Next Button).
- In Inspector, press + in On Click() to add a new click event response.
- Drag the Game Controller onto the empty object slot.
- In its function select list, locate and select the NextStep() function, as shown ahead:
- Following similar steps ...