okay so we are back and in the previous
video we finished up inside the level
blueprint and we created the script so
that when our player enters our little
room here the light that we've placed
turns on when we exit our room the light
turns off we've done that inside the
level blueprint here so if I play in the
editor and I enter our room there's a
little bit of a delay before our light
comes on and as we exit again we've
added that delay node so a little bit of
a delay before it turns off and our
script is working and we've done that
inside the level blueprint in this video
we're gonna start working with class
blueprints and we're going to take the
same setup that we've just done here
with our little room in our little light
we're going to add a light on the
outside here so that when the player
approaches a light from the outside it
turns on and off etc we're going to take
that same process that we've just done
and do that with a class blueprint now
you may be asking well why are we gonna
do a class blueprint if we've done this
functionality inside the level blueprint
already and it works we can enter our
room and it turns on our light we can
exit and it turns it off everything is
functioning as we expected why are we
gonna do it in a class blueprint well
that's the reason why we kind of need to
talk about class blueprints in this
video and and kind of illustrate why
class blueprints are the perfect setup
for this particular type of scenario say
for example we had more than one of
these rooms and we have our little room
here but say this was a street right and
we had multiple buildings say we had 10
15 20 of these buildings lined up and
down our street and we wanted to be able
to enter each of those rooms and have
our light turn on in on each of them and
turn off when we exit each of our rooms
well since we've done this inside the
level blueprint we would need to create
a trigger volume for each of our rooms
we need to add a point light for each of
our rooms we need to add this building
structure that we've created for each of
our rooms and not only that we would
need to provide this same scripted
functionality for each individual room
as we would need a reference to each
point light that we are talking about we
would need a reference to each trigger
volume that we are entering so as you
can see this could get really repetitive
if we
are having multiple rooms 10 20 30
versions of this room inside of our
level blueprint all that script is going
to get really repetitive and copying
pasting all that information and not
only that if we add another level and we
wanted to take all these rooms and place
them in a new level we would have to
recreate that entire setup inside that
new levels level blueprint so as you can
see it could get a bit tedious doing it
inside the level blueprint I mean it's
totally totally fine to do it that way
but working with class blueprints allows
you to kind of cut down your work
substantially by using a class blueprint
for this type of thing here so what
we're gonna do first thing we're going
to do actually is inside of our level
blueprint if you happen to close it go
ahead and go to the blueprints option
from the toolbar let's go to open level
blueprint make sure you have it open
we're going to take our on actor begin
overlap here and on the executable pin
here your mouse in just a little bit
we're gonna right click on this
executable pin button right click on it
it's gonna give us a little context menu
that gives us some pin actions and
there's two options here it says break
link to delay or jump to delay we want
to choose the break link to delay and
when it says delay we are talking about
this next node so if I break the link to
it it will disconnect the two nodes so
we're gonna do the same thing for the on
act or in overlap here so I'm a
right-click on this pin and choose break
link like so we've essentially disabled
the script now if we compile and we play
inside the editor here because we've
disconnected those those two nodes there
we have no way of toggling on our light
so if I enter our room nothing's going
to happen because we have not made those
connections so we're going to disable
this for now you can turn this back on
later if you'd like but we're gonna turn
the turn this same process into a
blueprint class so let's close the level
blueprint for now let's close it out and
there's a couple different ways that you
can create blueprint our class
blueprints in on run gen 4 and I'm gonna
show you probably the most common ways
and then show you a little
the alternate ways that you can do it so
the first way and probably the most
common is down through the content
browser we're gonna do let's actually go
to the root content folder here let's
right-click on the content folder we're
going to create a brand new folder
really quickly so right-click on the
content folder and choose new folder and
then it's gonna ask us for a name let's
just call it blueprints like so and make
sure that that blueprints folder is
selected and inside the content browser
on the right this is the asset tree I
guess I should mention this really
quickly through the asset tree this is
the actual content browser here so all
of our assets are going to be displayed
inside of this window over here so if we
went to the starter content again here's
our architecture assets etc we're going
to store all of our class blueprints
inside of this blueprints folder now now
that we have our blueprints folder set
up probably the most common way of
creating blueprints is to right-click in
the content browser and it's gonna give
you a context menu and there's several
options several things that we can
create but at the very top of the create
basic asset section of this context menu
is the blueprint class so going to
select this blueprint class option here
just go and select it and it's gonna
give us a new dialog window called the
pick parent class dialog window I kind
of want to talk about this for just a
second because you may be a little bit
not sure of what this means here so when
we've created when we've decided to
create a blueprint class we are going to
define the parent class for that
blueprint and by parent class I mean we
have different types of parent classes
that we can choose here when you choose
a parent class you're going to inherit
some type of functionality from that
parent class so what I mean that by that
is if we choose character here the
character as a parent has all kinds of
stuff built into it that just comes with
the character class when you create it
so things like movement speed and
whether or not you can jump falling
information all kinds of information
that pertain to a character
resides in the character parent class so
if we were creating a character
blueprint we would choose this and then
inherit all kinds of information from
the character that we can then use
inside of our new blueprint that we
created same thing for player controller
game mode etc all of these types of
classes have specific information
related to them that can be inherited
and used inside of your blueprint once
you create it so for our purposes we're
going to use an actor and an actor is
the tooltip here suggests an object that
can be placed or spawned in the world
and that's most of the time which are
going to be using when you're spawning
things inside of your level level or in
our instance making this toggle light
setup we would want to do that with an
actor so let's go and choose actor
actually I'm gonna select actor that's
gonna create a brand new blueprint for
us inside of our blueprints folder and
it's gonna ask us to enter a new name so
let's go ahead and enter a name for it
and we're gonna call this the light
underscore VP again there's that
abbreviation for blueprints so light
underscore BP and hit enter it's created
a brand new light blueprint for us now
that was one way that you can create
blueprints by right-clicking in the
content browser and choosing the
blueprint class you may have noticed if
you look down under the create advanced
asset under blueprints there's some
additional options that you can take for
the different types of blueprints that
you can create we're not going to cover
these specifically in this video series
because they're bits a bit outside of
our scope for this video series but you
can create additional types of
blueprints from the advanced option here
and that was done by right-clicking and
you could also click the add new button
which gives you that same context menu
so there's that same context menu with
those same same options as before now
the other way that you can create
blueprints is through the details panel
of the level editor so if
we have our light here so say we
selected our light and over in the
details panel see at the very top
there's a blue button for blueprint bad
script and the tooltip says converts
this actor into a reusable blueprint
class so this is going to take this
actor and add it to a blueprint that we
can then manipulate and we're gonna
actually do this a little bit later this
process of converting actors into a
blueprint we're going to take this whole
setup that we've created actually
probably we're going to take the new
light blueprint that we're going to add
on the outside here as well we're gonna
take all of those and convert them into
a blueprint class a little bit later so
that we can place multiple instances of
that blueprint class in our level so
then we could take this whole modular
please this whole blueprint class and
just drag and drop multiple instances of
it in in our level and have it just work
and not only in that in multiple levels
we could do it as well
so our light blueprint is created those
are the most common methods there's one
more method it's a little bit of the
obscure method but you could use this as
well from the blueprints option you can
create a new blueprint an empty
blueprint class from here as well it can
also also convert things to blueprint
from this option as well I would
probably say 90% of the time you're
going to be doing it from right-clicking
and creating a blueprint class here or
if you prefer the method of adding
things to your level and then selecting
all those things and converting it to a
blueprint those are probably the two
most common workflows for creating
blueprints in Unreal Engine 4 so our
light blueprint is created let's go
ahead and double click and open it up
really quickly so it is open and you may
have noticed now that the blueprint
editor has taken on an entirely new form
we have this big giant window with a
little ball here in the center we have
some more panels and tabs and all kinds
of things here kind of want to go over
this really quickly before we wrap up
this video or about 10
it's in so what we were looking at is
still the blueprint editor interface but
we are now looking at the class
blueprint versus the level blueprint so
the same functionality for them pretty
much exists there are some additional
things that you can do with the class
blueprint that you can't do with the
level blueprint we have our my blueprint
panel just as we did with the level
blueprint let me actually see if I can
open up both at the same time here so we
can get a better view here so I'm gonna
undock one so here's our level blueprint
can I do this side-by-side let's say
working on one screen here so I'm trying
to get a view of so that we can see both
something like this I'll just talk abut
wien both fun no not enough space on
this monitor
so what's it doing like this so here's
our level blueprint we have our my
blueprint panel we have the event graph
where we can do our visual scripting we
have the details panel if we look at the
class blueprint now we have the details
panel over here on the right still we
have the my blueprint panel but our
center section has changed a little bit
not only that we have an additional
window above the my blueprint section so
this section in the center here we are
currently set to the viewport tab and
the viewport tab of class blueprints
allow you to see all the components that
make up this blueprint and when we say
components we are talking about the
components window up here on the upper
left the components window consists of
things that you add to this blueprint
that define this blueprint so in our
case we could add if we go back to our
level here we can add minimize all this
stuff so we could add all these pieces
of wall walls as components we could add
our trigger box as a component we can
add our light as a component all of
these can be added as components to this
blueprint so what that allows us to do
is take all of these pieces this light
this trigger box and all these pieces as
one giant I shouldn't say giant cuz it's
really not that big but one modular
piece of an actor that we can then place
as a
unit inside of our levels so that's what
the components panel is and the viewport
will allow you to see these objects
inside of the name suggests the viewport
here so let me go ahead and pump this
back up just a little bit the next tab
over from the viewport is the
construction script what you're going to
work on this work with this a little bit
later in this video series probably
towards the end so I won't go too in
depth into it here but what it allows
you to do is set up some some variables
or things that you want to define inside
the editor because anything that is
changed about this blueprint anytime you
change anything about this blueprint
change any parameters or variables or
anything that you do to this blueprint
move it inside the level viewport here
whatever is connected to this wire will
get executed now this is only fired for
non gameplay so before you play the game
when you're inside the level editor
constructing your levels etc that's when
this is fired the event graph which
looks very similar to our level
blueprint now have some additional nodes
here and this is where we're doing our
visual scripting just as we did with the
level blueprint a moment ago in the
previous video so that's what we do on
the event graph and we're actually going
to pause here before we continue and
start setting up this class blueprint
let's recap recap really quickly here so
we were going to be working with class
blueprints moving forward and the class
blueprint is a lot different than the
closest the level blueprint because the
level blueprint is self-contained within
each of your levels whereas the class
blueprint can be placed in multiple
instances and can be placed across
levels so we're going to be working with
class blueprints moving forward we're
going to set ours up in the next video
that's going to do it for this video
thank you guys for watching and we'll
see you in the next video where we work
on our class blueprint