Introduction to Blueprints in Unreal Engine #Part 1

Introduction:

As you have arrived at this post you are likely aware that Unreal Engine has a visual scripting system called Blueprint. This system is awesome and you can do all types of wonderful things with Blueprints. Including adding functionality to games or animations, making entire games, VR simulations, XR experiences and other functionality within Unreal Engine.

Blueprints are a little bit like flow charts that use connected nodes to create functionality for a game, animation or simulation.

Blueprint Types:

When you create a new blueprint (right click in a content folder or use the add new content button) you will be given certain options that are outlined below. You will likely use these classes the most often: Actor, Game Mode Base and Character.

  1. Actor: A basic blueprint class that can be spawned in the level/world. This is a very common starting point for when making a blueprint.
  2. Pawn:  Similar to the Actor blueprint above, but has a little more functionality and can be possessed and receive input from a controller.
  3. Character: Similar to a pawn – but includes the ability to walk around, it has a movement and character mesh component included. You would use this for creating your 3rd and 1st person characters.
  4. Player Controller: This is an actor responsible for controlling a pawn used by a character.
  5. Game Mode Base: Set the default settings for a game or level. Such as the character or HUD to use.
  6. Actor Component: A usable component that can be added to an actor.
  7. Scene Component: A component that can be placed in a specific location in a scene and can have other actors attached to it.

You don’t need to know any coding language to use Blueprints, although it can be beneficial if you know C++. This is the coding language for Unreal Engine and for making games with it. Blueprints are based on C++ and much of the coding language used in Blueprints comes from C++. So the variables (how strong a light is set for example) that are used to control functions or elements in blueprints originate from C++. One word of caution is that Blueprints use a virtual machine to run the code, so C++ is more powerful and uses less resources.

In short Blueprints allow for constructing C++ using a visual node based system.

Blueprint Variables:

This nicely brings us on the first lesson for Blueprints and this is understanding the key variables that you can add into a Blueprint. As noted anyone familiar with C++ or for that matter some other coding languages – will be familiar with these terms below that are used in blueprints.

  1. Float: A decimal number and can be broken down.
  2. Boolean: Is a switch ‘yes’ or ‘no’ or more technically a 0 OR 1.
  3. Integer: Is a whole number and is not a decimal and cannot be broken down to further digits like 1.23.
  4. String: A string of numbers or letters. Good for storing text information.
  5. Vector: Is made up of 3 different values and can be used for things like getting a world location or colour value (RGB).
  6. Rotator: Is very similar to a vector and has 3 variables for rotating on X,Y and Z axis.
  7. Transform: Is also similar to a Vector and has variables for for location, rotation and scale.
  8. Name: Simply you can name something within the game to help identify it.

Variables can be added using the + Button in the variable section of the blueprint.

Unreal Engine Blueprint Variables

User Interface:

When you create a new blueprint and then open it you will be presented with 3 tabs at the top as listed below.

  1. Viewport: For adding meshes, particles and various other visual elements for use in game.
  2. Construction Script: Runs a script only once at the start of play.
  3. Event Graph: Runs a script continuously throughout the game or whenever triggered.

Components Panel:

On the left hand side is a Component panel where you can add various elements such as static meshes, particle effects, rotating movement and many others.

Details Panel:

On the right hand side is a details panel for when a node or component is selected and this will show its various details and also what variables or functionality can be changed.

Top Menu shortcuts:

You will see a compile button for compiling your blueprint when you are ready to do so and a play button for playing the blueprint. You will only press this play button to test its working, as the blueprint will be activated in game as per the code in the blueprints.

This at a high level is an overview of Blueprints in Unreal engine, but as the old saying goes a picture paints a thousand words, so now click here and let’s now jump into creating a simple blueprint.

Below is the view of the Viewport Tab within the same blueprint.