Unreal Engine Blueprint visual scripting editor with event graph
The Blueprint Editor — Event Graph showing an input action driving a character jump via the Character Movement Component.

Blueprint Types

UE5 supports several kinds of Blueprint assets, each suited to different tasks:

TypeDescriptionCommon Use
Blueprint Class Extends any C++ or Blueprint class. Contains components, variables, and graphs. Characters, enemies, weapons, pickups, doors
Level Blueprint Per-level script. Has access to all actors in that level. Level-specific events, cutscene triggers
Blueprint Interface Defines functions any Blueprint can implement. Enables polymorphism. Interactable interface, damage interface
Blueprint Macro Library Reusable macro subgraphs shared across Blueprints. Utility macros, debug helpers
Blueprint Function Library Static pure functions accessible from any Blueprint. Math helpers, game utilities
Animation Blueprint Specialised Blueprint for driving skeletal mesh animations via state machines. Character animation, procedural IK

Event Graph

The Event Graph is the main execution graph of a Blueprint Class. Execution begins at Event nodes (red header) and flows left-to-right through function call nodes connected by execution wires (white lines). Data flows through typed pins (colored lines).

Blueprint event graph with BeginPlay, Tick, and custom event nodes
A typical Blueprint Event Graph: Event BeginPlay initializes state, Event Tick runs each frame, and a Custom Event handles an ability trigger.

Common Built-in Events

  • Event BeginPlay — Fires once when the game starts or the actor is spawned.
  • Event Tick — Fires every frame. Delta Seconds output gives the frame time.
  • Event EndPlay — Fires when the actor is destroyed.
  • Event ActorBeginOverlap — Fires when another actor enters an overlap volume.
  • Event Hit — Fires on a physics collision hit.
  • Event AnyDamage — Fires when the actor receives any damage.

Variables

Variables store data in a Blueprint. They are created in the My Blueprint panel and can be exposed to the Details panel for per-instance editing via Instance Editable and to other Blueprints via BlueprintReadWrite.

TypePin ColorExamples
Boolean■ RedbIsAlive, bCanJump
Integer■ CyanHealth, Score, Level
Float■ GreenSpeed, JumpHeight
String■ MagentaPlayerName
Vector■ YellowSpawnLocation, Velocity
Rotator■ Sky BlueInitialRotation
Object Reference■ PurpleTargetActor, PlayerRef
Struct■ TanFHitResult, FTimerHandle

Functions & Macros

Functions are reusable subgraphs with input/output parameters. They execute synchronously and compile to a single function call. Functions can be Pure (no execution wire, no side effects) or Impure (execution wire required).

Macros are similar but are inlined at compile time. They support multiple execution inputs/outputs (useful for branch-like behavior) but cannot be overridden or called from C++.

ℹ️
Functions vs Macros

Prefer Functions over Macros when possible — functions appear in the call stack for easier debugging, can be overridden in child Blueprints, and integrate with C++ via BlueprintImplementableEvent.

Blueprint Casting

Casting converts an object reference from a base type to a more derived type, granting access to child-specific variables and functions. Use a Cast To node:

Blueprint Pseudocode
// Retrieve the player character and access a custom variable
Get Player CharacterCast To BP_MyCharacter
    Success → As BP_My CharacterGet HealthPrint String
    Fail    → (handle failure — target is not BP_MyCharacter)
⚠️
Cast Creates a Hard Reference

Casting to a Blueprint class forces that class to always load. For loose coupling, prefer Blueprint Interfaces instead of direct casts.

Timers & Delays

The Set Timer by Function Name or Set Timer by Event nodes schedule delayed or repeating function calls without blocking the frame. The Delay node creates a latent action — execution pauses on that node but the rest of the engine continues running.

Blueprint graph showing Set Timer By Event and Delay nodes
Using Delay and Set Timer By Event to create a respawn sequence: wait 3 seconds after death, then respawn the player at a random spawn point.

Blueprint Communication

Three primary patterns for Blueprints to communicate with each other:

  1. Direct Reference — Store a reference to another actor and call its functions directly. Simple but creates tight coupling.
  2. Blueprint Interface — Call a message on any actor. If it implements the interface, the function runs. Loose coupling, no cast needed.
  3. Event Dispatchers — A publisher/subscriber pattern. Blueprints bind to a dispatcher and receive notifications when it fires. Ideal for UI updates.