Skip to content

Chapter 2 of 8

Blueprints and Visual Scripting

Blueprints are Unreal's visual scripting system and form the backbone of gameplay logic for most projects. A Blueprint Class is created from the Content Browser by right-clicking and choosing Blueprint Class, then selecting a parent class such as Actor, Pawn, or Character. Double-clicking the asset opens the Blueprint Editor, which contains the Event Graph for runtime logic, the Components panel for assembling the actor's parts, the My Blueprint panel for managing variables, functions, and macros, and a viewport preview for visual actors. Components added to the Components panel, including Static Mesh, Skeletal Mesh, Scene, and Actor Components, define what the actor can render, collide with, or do. A Scene Component specifically carries a transform and can be parented to other Scene Components to build hierarchies, while plain Actor Components provide behavior without their own transform.

The Event Graph contains nodes wired together to react to events and drive behavior. Event BeginPlay fires once when the actor enters the world during gameplay and is the standard place to initialize variables, spawn sub-actors, attach components, or kick off timers. Event Tick runs every frame on tickable actors and components, receiving a Delta Seconds float, and is appropriate for per-frame logic like movement or interpolation, though care should be taken to minimize its cost. Custom Events, created via the right-click menu, define named event-like entry points that other actors or Blueprints can call. Flow control nodes include Branch for boolean conditions, Delay for timed pauses, Sequence for ordered execution, and ForEachLoop for iterating over arrays. A Timeline plays curves over time, useful for doors, fades, or camera dollies without relying on Tick.

Variables and functions are at the heart of Blueprint organization. A variable is created in the My Blueprint panel by clicking the + button next to Variables, then naming it and choosing a type such as int, float, bool, vector, or an object reference. Variables can be marked Instance Editable so they appear on the placed actor in the Details panel, or Expose on Spawn so they can be set when Spawn Actor From Class is called at runtime. The Set node assigns a value to a variable at runtime, while Get nodes retrieve it. Blueprint functions are compiled graphs that can have inputs, outputs, and local variables; they are called like C++ functions. Macros are similar but are inlined at every call site and can expose multiple execution pins. A Blueprint Function Library is a container of static functions callable from any other Blueprint or C++, ideal for reusable utility code. To communicate with a specific class, the Cast To node attempts to convert a generic object reference into a more specific class, sending execution out of either a valid or failed pin. A Blueprint Interface defines a shared set of functions that any implementing Blueprint can adopt, allowing different actor types to communicate without needing direct class references.

All chapters
  1. 1Editor Interface and Asset Management
  2. 2Blueprints and Visual Scripting
  3. 3Materials and Shading
  4. 4Lighting and Rendering
  5. 5Physics, Collision, and Movement
  6. 6Actors, Levels, and Runtime Spawning
  7. 7Animation, AI, and Multiplayer
  8. 8Packaging, Profiling, and Project Settings

Drill it

Reading is not remembering. These come from the Unreal Engine Basics deck:

Q

What Unreal Engine panel displays the list of actors currently present in the level?

The Outliner panel lists all actors currently placed in the level, organized hierarchically, and allows selection, searching, grouping, and visibility toggling...

Q

How do you open the Blueprint editor for a specific Blueprint asset?

Double-click the Blueprint asset in the Content Browser (or right-click and choose Edit), which opens the Blueprint editor containing Event Graph, Functions, Va...

Q

What is the purpose of the Construction Script in a Blueprint?

The Construction Script runs when an actor is placed or moved in the editor, and again whenever a property changes. It is commonly used for procedural setup suc...

Q

Which node executes logic only once when the game begins playing?

The Event BeginPlay node fires once on each actor when play starts, after construction and initialization, making it the standard place to set up gameplay logic...