Adding the AR mode button

Earlier in this chapter there was a section called Switching between AR Mode. We will implement the same thing here. We will make room at the bottom of the screen and add a button that reads AR Mode as follows:

  1. In Hierarchy, select the Content Scroll View (under Main Canvas).
  2. On its Rect Transform, set Bottom to 50.
  3. With Main Canvas selected, go to UI | Button and rename it AR Button.
  4. Set Height to 50.
  5. For Anchor Presets, set Bottom/Stretch, and then also Alt+click the same to move it into position.
  6. Set Source Image to none and Color the same as the Nav Panel: 74, 182, 208, 255 (#4AB6D0FF).
  7. Edit its child text object; Text: AR Mode, Font Size: 25, Color: white (#FFFFFFFF).

Very well. We can now wire up the button ...

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.