O'Reilly logo

Virtual Reality Blueprints by John Williamson, Charles Palmer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Finalizing user interaction

To complete our project, we will need to add two final components. These components will facilitate selecting an image for preview and providing visual feedback during the selection process.

Add the Graphic Raycaster component to the Preview objects. If you run the Scene, you will notice that our Swipe functions work as designed, but the user can not select a preview image for display. This is because our Preview thumbnail objects are looking for a Graphic Raycaster, but none is present; let's fix that:

  1. Select Preview (1) through Preview (5) in the first Gallery PreviewHolder.
  2. Click on Add Component in the Inspector window.
  3. Search for Graphic Raycaster and apply it to the selected GameObject.
  4. Repeat this process ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required