Pages

segunda-feira, 24 de julho de 2023

Book update: Blueprints for Unreal Engine 5


A book about technology has the disadvantage of being stuck in time while technology changes at a rapid rate.

The purpose of this article is to point out the main sections of the book that were impacted by changes in Unreal Engine 5 and to show how to adapt to these changes.

If you don't know my book, see the book description on Amazon.com:

Blueprints Visual Scripting for Unreal Engine 5


This book was a project that required a lot of dedication from me, but I'm glad I accepted the challenge.

The book was successful in many ways and what I love the most is the great feedback I get from readers and instructors.

The book was translated into Korean and published in March 2023:

Blueprints UE5 Korean edition


The book is also being translated into Chinese and it will be published in 2024. 


UPDATES


I'll separate the updates using bullet points and present the changes that made the most impact first.

The first tip for those who are having difficulty making the examples in the book is to download the source code available on GitHub:

https://github.com/PacktPublishing/-Blueprints-Visual-Scripting-for-Unreal-Engine-5

Click the Code button and then on Download ZIP:


The source code has the templates that are being used in the book and all the examples are working. 


  • Templates changes

In the examples of the book I use the First Person and Third Person templates a lot. Epic Games modified these templates. These changes do not affect the examples that create new Blueprints, but affect the examples that modify the Blueprints of these templates.

Part 2 and part 3 (chapters 5 to 12) of the book consist of the step-by-step  development of a game based on the First Person template.

My suggestion is to get the chapter 5 project from the source code and keep following the book using this project until chapter 12, because you will find in the project everything that are shown in the images of the book.



  • Offset problem in Blueprints of Starter Content (v5.2)

In version 5.2, some Blueprints from the Starter Content, such as Blueprint_Effect_Fire and Blueprint_Effect_Explosion,  are not appearing in the correct location when instances are created using the Spawn Actor from Class node.

Someone at Epic Games removed the root scene component of these Blueprints to use the particles component as root, but the relative location of the particles component didn’t change to (0,0,0).

To adjust these Blueprints, it is needed to add a scene component and set it as the root component. After that, set the correct 0,0,0 location in the particles component.



  • Chapter 4: Casting in Blueprints example

The Casting example is missing a step. It's on page 77 of the paperback version.

The new BP_GameModeWithScore Blueprint has to be edited in Class Defaults setting Default Pawn Class to BP_ThirdPersonCharacter.



  • Timeline track buttons

In the Timeline editor there were separate buttons with a letter for each track. Now there is a +Track button that opens a submenu with the tracks available.



  • Make Noise node

It is recommended to add the Self node in the Noise Maker parameter of the Make Noise node. See figures 10.18 and 10.20 of the book.



  • Accessing the BP_Weapon_Component (new template) 

This tip is if for those who are using the new First Person template. The rifle is represented by a generic BP_Weapon_Component Blueprint. The next steps show how to create a reference to the BP_Weapon_Component in the BP_FirstPersonCharacter Blueprint.

1. Create a variable of type BP_Weapon_Component (Object Reference) on the Blueprint BP_FirstPersonCharacter and compile the Blueprint.


2. Open the BP_Pickup_Rifle Blueprint, drag a wire from the output blue pin of SET First Person Character Reference and add the node SET BP Weapon Component. Connect the Return Value pin of Add BP Weapon Component to the input pin of the SET node.


3. Now you can access the BP_Weapon_Component anywhere using the nodes  of the next image.