Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
XR Development with Unity

You're reading from   XR Development with Unity A beginner's guide to creating virtual, augmented, and mixed reality experiences using Unity

Arrow left icon
Product type Paperback
Published in Nov 2023
Publisher Packt
ISBN-13 9781805128120
Length 284 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Anna Braun Anna Braun
Author Profile Icon Anna Braun
Anna Braun
Raffael Rizzo Raffael Rizzo
Author Profile Icon Raffael Rizzo
Raffael Rizzo
Arrow right icon
View More author details
Toc

Table of Contents (15) Chapters Close

Preface 1. Part 1 – Understanding the Basics of XR and Unity FREE CHAPTER
2. Chapter 1: Introduction to XR and Unity 3. Chapter 2: The Unity Editor and Scene Creation 4. Part 2 – Interactive XR Applications with Custom Logic, Animations, Physics, Sound, and Visual Effects
5. Chapter 3: VR Development in Unity 6. Chapter 4: AR Development in Unity 7. Chapter 5: Building Interactive VR Experiences 8. Chapter 6: Building Interactive AR Experiences 9. Chapter 7: Adding Sound and Visual Effects 10. Part 3 – Advanced XR Techniques: Hand-Tracking, Gaze-Tracking, and Multiplayer Capabilities
11. Chapter 8: Building Advanced XR Techniques 12. Chapter 9: Best Practices and Future Trends in XR Development 13. Index 14. Other Books You May Enjoy

Adding interactivity to our AR menu application

To infuse life into our currently modest AR scene, we must incorporate some C# scripts into our project. This key step will empower the users of our AR app, allowing them to interact with our imported food prefabs dynamically and engagingly.

In the next section, you will get an overview of the short but decisive Food script.

Adding the Food script to the scene

Before we dive into scripting, let’s first organize our project workspace so that we can work more efficiently by finding the needed components quickly.

Start by adding a new folder to the Assets directory in the Project window. Simply right-click and select Create | Folder. Rename this folder Scripts and enter it. Right-click in this empty folder and select Create | C# Script to create a script called Food. After double-clicking on this script, it should be opened in your preferred integrated development environment (IDE).

The Food script defines a custom...

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 €18.99/month. Cancel anytime