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