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
Unreal Engine 4 Virtual Reality Projects

You're reading from   Unreal Engine 4 Virtual Reality Projects Build immersive, real-world VR applications using UE4, C++, and Unreal Blueprints

Arrow left icon
Product type Paperback
Published in Apr 2019
Publisher Packt
ISBN-13 9781789132878
Length 632 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Robert Ruud Robert Ruud
Author Profile Icon Robert Ruud
Robert Ruud
Kevin Mack Kevin Mack
Author Profile Icon Kevin Mack
Kevin Mack
Arrow right icon
View More author details
Toc

Table of Contents (20) Chapters Close

Title Page
About Packt
Contributors
Preface
1. Thinking in VR FREE CHAPTER 2. Setting Up Your Development Environment 3. Hello World - Your First VR Project 4. Getting Around the Virtual World 5. Interacting with the Virtual World - Part I 6. Interacting with the Virtual World - Part II 7. Creating User Interfaces in VR 8. Building the World and Optimizing for VR 9. Displaying Media in VR 10. Creating a Multiplayer Experience in VR 11. Taking VR Further - Extending Unreal Engine 12. Where to Go from Here 1. Useful Mind Hacks 2. Research and Further Reading 3. Other Books You May Enjoy Index

Controlling your Media Player


Before we wrap things up for this chapter, let's give our players a few ways to control their Media Player.

We could do this work from within the level blueprint, and that's what we've been doing so far, but that's not an ideal solution if we're going to have multiple maps in our project. We're going to wind up copying and pasting Blueprint code from one level to another, and if we update one of them, we have to remember to update the rest. This is bad practice.

 

A much better idea is to create a manager actor that contains all the code we need to manage our media player, and that we can just drop into any level that needs to support it. This way, we're writing our code once, and as we update it, the effects are seen everywhere. Let's do this.

Creating a Media Manager

Let's create a new Blueprints subdirectory inside our project's content directory:

  1. Right-click inside it and select Create Basic Asset | Blueprint Class.
  2. For its Parent Class, select Actor.
  3. Name it BP_MediaManager...
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