Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Augmented Reality with Unity AR Foundation

You're reading from   Augmented Reality with Unity AR Foundation A practical guide to cross-platform AR development with Unity 2020 and later versions

Arrow left icon
Product type Paperback
Published in Aug 2021
Publisher Packt
ISBN-13 9781838982591
Length 382 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Jonathan Linowes Jonathan Linowes
Author Profile Icon Jonathan Linowes
Jonathan Linowes
Arrow right icon
View More author details
Toc

Table of Contents (14) Chapters Close

Preface 1. Section 1 – Getting Started with Augmented Reality
2. Chapter 1: Setting Up for AR Development FREE CHAPTER 3. Chapter 2: Your First AR Scene 4. Chapter 3: Improving the Developer Workflow 5. Section 2 – A Reusable AR User Framework
6. Chapter 4: Creating an AR User Framework 7. Chapter 5: Using the AR User Framework 8. Section 3 – Building More AR Projects
9. Chapter 6: Gallery: Building an AR App 10. Chapter 7: Gallery: Editing Virtual Objects 11. Chapter 8: Planets: Tracking Images 12. Chapter 9: Selfies: Making Funny Faces 13. Other Books You May Enjoy

Highlighting the selected picture

There are many ways to highlight objects in Unity to indicate that an object has been selected by the user. Often, you'll find that a custom shader will do the trick (there are many on the Asset Store). The decision comes down to what "look" you want. Do you want to change the selected object's color tint, draw a wireframe outline, or create some other effect? Instead of doing this and to keep things easy, I'll just introduce a "highlight" game object in the FramedPhoto prefab as a thin yellow box that extends from the edges of the frame. Let's make that now:

  1. Open the FramedPhoto prefab for editing by double-clicking it in the Project window.
  2. In the Hierarchy window, right-click on the AspectScaler object and select 3D Object | Cube. Rename the cube Highlight.
  3. Set its Transform | Scale setting to (1.05, 1.05, 0.005) so that it is thin and extends past the edges of the frame.
  4. Set its Transform...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image