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
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

Building interactive VR experiences with C#

So far, we have added interactions to our scene just by using Unity’s Animation system without writing a single line of code. In the next sections, you will learn how you can use scripting with C# to add even more complex breaths of air into your GameObjects and scene.

The first question we are going to answer is this: when do we need to write C# code for our animations and interactions?

Understanding when to use C# for animations and interactions

It’s important to understand that Unity’s animation and animator systems and the use of C# scripting are not mutually exclusive. They are often used together, with the animator controlling predefined animations and C# adding interactivity based on user input or other game events.

In the previous section, we rotated and scaled cars based using Unity’s animation and animator systems. These systems are primarily used to create predefined animations. We can divide...

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