Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Unreal Engine 4 Game Development Essentials

You're reading from   Unreal Engine 4 Game Development Essentials Master the basics of Unreal Engine 4 to build stunning video games

Arrow left icon
Product type Paperback
Published in Feb 2016
Publisher
ISBN-13 9781784391966
Length 266 pages
Edition 1st Edition
Tools
Arrow right icon
Authors (2):
Arrow left icon
Satheesh P.V Satheesh P.V
Author Profile Icon Satheesh P.V
Satheesh P.V
Satheesh PV Satheesh PV
Author Profile Icon Satheesh PV
Satheesh PV
Arrow right icon
View More author details
Toc

Assigning our HUD to Character


Now that we have finished setting up the HUD, it is time we assign it to the character. Let's close Widget Blueprint for now and open ThirdPersonCharacter Blueprint.

Inside our Character Blueprint, open the Event Graph and:

  • Right-click and, from the resulting context menu, search for Event BeginPlay and select it.

  • Drag a wire from the execution pin of Event BeginPlay and release the mouse button. From the context menu, search for Create Widget and select it.

  • In the Create Widget node, select MyUMG_HUD in the class pin.

  • From the Return Value of the Create Widget node, drag a new wire and release the mouse button. From the context menu, search for Set My Character and select it.

  • Right-click on the graph editor and search for self and select Get a reference to self. Connect this node to the My Character pin.

  • Again, drag a wire from the Return Value of the Create Widget node and search for Add to Viewport.

  • Connect the output execution pin of the Set My Character node to...

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