← Learn library

Unreal Engine & Blueprints / Unreal Engine

Unreal Engine 4 Blueprint Variable Basics Tutorial (Hello World)

Channel: CGI Nerd ·

Legacy TutorialWritten guide

This tutorial is part of the CGI Nerd archive. Some software features, interfaces, or workflows may have changed since it was recorded.

Original CGI Nerd video thumbnail
Unreal Engine 4 Blueprint Variable Basics Tutorial (Hello World)CGI Nerd · Video hosted on YouTube

Playing loads YouTube content. YouTube processes data after activation.

Watch on YouTube

If the player is blocked or unavailable, use Watch on YouTube.

Software: Unreal Engine

Create an Actor Blueprint that assigns a string and prints “Hello World” when play begins. This first variable exercise introduces data types, Get versus Set, execution connections and the difference between a Blueprint asset and an instance placed in the level.

The title identifies Unreal Engine 4; the exact minor version is unverified. Menu placement and colors belong to that historical interface. The important result is the small, inspectable path from Begin Play through assignment to output.

Open the Actor’s Event Graph and create a variable

At 00:00, create a Blueprint Class in the Content Browser and choose Actor. Name it for the exercise and open it. If the compact editor offers a link to the full Blueprint Editor, follow that link.

At 01:03, switch from the viewport to the Event Graph. The initial graph includes Begin Play and other events, but this exercise needs only Begin Play to trigger its work.

At 02:02, use the Variables section’s plus button to create a variable. Dragging it into the graph offers Get and Set. Get reads the value for another operation; Set assigns a value when its execution input runs.

The recording calls the new variable a placeholder with no information yet. More precisely, it has a type/default state but has not been given the intended “Hello World” value. That distinction matters when an unconfigured Get returns a default instead of the message expected.

Choose a type for the intended data

At 03:01, inspect the type menu. The lesson mentions Boolean, integer types, floating-point values, Name, String, Text, Vector, Rotator and Transform. For this exercise, choose String.

Use the type’s purpose rather than its pin color alone:

Type Useful interpretation for this lesson
Boolean True or false
Integer Whole-number value
Float Numeric value that can represent fractional quantities
String Character data used for the printed message
Vector Three numeric components such as X, Y and Z
Rotator Rotation values, distinct from a generic vector
Transform Translation, rotation and scale together

Two spoken shortcuts need qualification. Name, String and Text are not interchangeable merely because each can display characters; Epic’s variable reference distinguishes identifiers from strings and localizable user-facing Text. Also, Transform should not be defined as a “matrix of nine values,” as the narration suggests. Its Blueprint data roles are translation, rotation and scale.

These clarifications do not change the exercise: String is suitable for its simple diagnostic message.

Assign the message before printing it

At 05:02, change the variable to String and enter Hello World on its Set node. At 06:04, connect Begin Play’s execution output to Set.

At 07:01, add Print String after Set and provide the variable’s value to its string input. There are two responsibilities in the graph: the execution wires establish when the operations run, and the data wire supplies the message to print.

Entering text on an unexecuted Set node is not enough. Likewise, a Get node alone does not print anything; it only makes the current value available to a compatible input. Inspect both the execution path and the value connection before compiling.

Place an instance and inspect the output in two places

At 07:01, compile the Blueprint, return to the level and drag the asset into the scene. Start Play. At 08:00, the message appears briefly in the viewport.

The instructor repeats the test and opens Window → Developer Tools → Output Log in the recorded interface to inspect the message more reliably. A fading on-screen print is not evidence that the string variable has been cleared; it is the display behavior of the diagnostic message.

If no message appears, check that the Actor instance exists in the level and that Begin Play reaches Set and then Print. If the wrong message appears, check the assigned value and the connected data input.

The completed result is one runtime assignment and one observable message at Begin Play. Editing instances, communication between Blueprints and other variable operations are introduced as later work, not demonstrated by this first test.