Adding a capture button

The app needs to provide users with a way to say here, use this view of the real world as my image target, which Vuforia can then recognize and activate the AR content. For this we'll add a prompt and a capture button. The various prompt UI elements will be enclosed in an AR Prompt panel. Let's create that first:

  1. Select Main Canvas in Hierarchy.
  2. Create UI | Panel.
  3. Name it AR Prompt.

It will have no background at all, since we need to show a video feed. We can remove its Image component entirely.

In the gear-icon for the Image component, select Remove Component.

Meanwhile, the work we're composing now will be seen by the user when in VR Mode, so you can manually disable the Content Scroll View panel now, temporarily.

Now add the big fat capture button:

  1. With AR Prompt selected, create UI | Button and name it Capture Target Button.
  2. Set its Height to 100.
  3. Set Anchor Presets to Bottom/Stretch, and then Alt+click to position it there.
  4. Adjust its Pos Y position to 100 to leave room for the AR View button.
  5. Set Source Image to none. We picked a darker green Color: #004C5EFF.

Its Rect Transform looks like this:

For its child Text object:

  1. Set Text to Capture Target.
  2. Set Size to 25.
  3. Color: white.

OK, we're getting there.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.223.125.219