>> Welcome to Unreal tips and tricks.
This is part one of a two-part presentation
on Variant Management.
In part one we're going to learn how to use a Variant Manager
to create and set up a Level Variant Set Asset,
providing you with an easy way to switch
between multiple different Variants or options.
In part two we're going to build a car configurer
that allows you to turn Variants on and off
in our runtime experience with the Blueprint functions
provided by the Level Variant Set Actor Class.
In this presentation we're going to be using the Variant Manager
to switch between two different wheel options on our vehicle.
The first step when working with the Variant Manager
is the creation of a new Level Variant Set Asset.
This is done by clicking the Add New button
in the upper left-hand corner of the Content Browser,
going to the Miscellaneous folder,
and selecting Level Variant Sets.
With that added into my Content Browser,
let's rename this as something slightly more meaningful.
We'll call this Car Level Variant Sets and we'll drag
and drop it from our Content Browser into the Viewport
to add it to our current level. Once that is completed,
the next thing that we want to do
is display the Variant Manager,
and this is easily done by double clicking
on the Level Variant Set icon in the Content Browser.
Here we are presented with the Variant Manager.
And this is where we can start to define our Variant Sets
as well as the different options
that will live inside of those Variant sets.
Let's go ahead and click on the Variant Set icon
in the upper left-hand corner to create a Variant Set
that will hold the options for our wheels.
With this Variant Set created, I'm going to rename it
by right clicking on top of it and selecting Rename.
We'll give this a new name
and we'll call it Variant Set Wheels.
Next we'll create our first Variant
to represent the wheels in their current dark state.
Click the plus icon on the Variant Sets Wheel bar
to create the first Variant.
Go ahead and rename that again by right clicking on top of it
and selecting rename. We'll call this Variant Dark.
With the naming completed, the next step is to associate
one or more Static Meshes with this Variant
or with this option.
This is done by simply going into the World Outliner
and selecting the Actors that you want associated
with this option or this Variant.
You'll notice that my dark wheels
and my light wheels
are both comprised of several Static Mesh Actors.
Now we'll select both sets of wheels
by holding down the control key
and we'll drag and drop the wheels from the World Outliner
onto our Variant to create the bindings.
As soon as I let go of the mouse button,
you'll notice that the Capture new Actors and properties window
has been displayed.
This is where we can define which properties we want
the Variant Manager to look at or manage for these Actors.
This example is pretty simple.
All we need to look at is Root Component Visibility.
We'll go ahead and we'll check that on
and then click the Select button to complete the operation.
Now you'll notice in the Variant Manager that Variant Dark
has two Actors associated with it.
If I highlight one of the Actors,
the properties and its current value are now displayed.
Obviously, the dark wheels are checked on,
the values are positive state for that Boolean switch
and the light wheels,
the visibility value is disabled or checked off.
It's all pretty straight forward.
Now that we have our first Variant or option defined
for the dark wheels,
let's go ahead and create one for the light wheels.
We can do this extremely quickly by taking the work
that we've already done and duplicating it.
Just go back to Variant Dark,
right click on top of it and select Duplicate.
We now have a second Variant in our Variant Set Wheels
called Variant Dark Zero.
Let's go ahead and rename that guy again
to something slightly more meaningful.
We'll call this one Variant Light.
The next step is obviously to go to the properties
for each of these Actors and change the visibility state.
Notice what happens in the Viewport
when I turn off the value of visibility for the dark wheels.
Nothing changed in the Viewport.
This happens because the Variant Manager hasn't
pushed that information back into the level.
At any time, if you want to visualize
the current state of a value for a given property,
all you have to do is right click on top of it
and select Apply Recorded Values.
As soon as I do that,
you can see that now the Viewport represents
actually what's going on inside of the Variant Manager.
Let's do the same exact operation
for the wheels that are light. Let's click on the light wheels.
We'll go to its visibility and we'll change its state
to an on state for that Boolean switch.
Again, if I want to see the value of that property
represented in the Viewport,
all I have to do is right click on top of properties
and select apply recorded value. Now we've set up two Variants,
one for the dark wheels and one for the light wheels.
To switch between these Variants and see the change happen,
all you have to do is double click on the actual Variant.
If we go over to the Variant and double click on Variant Dark,
obviously it switches on and displays Variant Dark.
Of course, if we double click on Variant Light,
we'll start to display that set of options.
The final step is to record a couple of thumbnails
that visually capture what these Variants are.
We'll just zoom in on the wheel, we'll go to Variant Light,
we'll right click on top of it and we'll create a thumbnail.
Let’s do the same thing for the dark option.
Double click on Variant Dark to turn those on, right click
and say create thumbnail. That was just a simple example
of how we can use a Variant Manager
to quickly change between two different wheel options.
This is part one of a two-part demo.
In the second part we're going to build a car configurer
that works in the runtime built on top of the Variant Manager
using a custom user interface
with the help of some Blueprint code.
Hopefully you guys check it out and enjoy it. Cheers everybody.