Next, add the button that lets the user set the graphics position:
- At the Hierarchy root, create UI | Button and name it Anchor Button.
- Set its Height to 100.
- Set Anchor Presets to Bottom/Stretch, then Alt+click to position it there.
- Adjust its Pos Y position to 100 to leave room for the AR Mode button.
- Set Source Image to none; we picked a darker green Color: #004C5EFF.
- For its child Text object, set Text to Set graphic position, Font Size: 25, Color: white.
Now to wire up the Anchor button:
- Select the Anchor Button and add the OnClick event.
- Press the + in the OnClick list.
- Drag the Game Controller to the Object slot, then choose the function InstructionsController.ToggleAnchor().
If you press Play now, ...