Verse Wiki — the Verse handbook for Blueprint authors
Chapter 2 · Lesson 6

Your First Verse Class: From Blueprint Class to .verse File

Last lesson you learned to read a node graph as indented blocks. This lesson you build your first thing. In Blueprint you right-click, create a Blueprint Class, pick a parent, and get an asset — double-click it and there is an Event Graph, a variables panel, a Details panel. In Verse the equivalent move is one sentence long: create a .verse file and declare a class inside it. Those two are strictly parallel, and we are going to line them up slot by slot.

1. The Same Move, Two Ways to Make It

Start by recalling the workflow you already know. You want a door that opens by itself, so: right-click in the Content Browser → Blueprint Class → pick a parent in the dialog (Actor, say) → name it BP_MyDoor. A new asset appears in the Content Browser; double-click it and you see three places: the Event Graph in the middle, the Variables section of the My Blueprint panel on the left (the variables panel), and the Details panel that lights up on the right whenever you select a node or a variable.

Doing the same thing in Verse looks like this: create a plain text file called my_door.verse, write one line inside it — my_door := class(creative_device): — then indent and write the variables and the events underneath.

Put the two side by side and the mapping is strict:

Exactly one thing does not map one-to-one, and it is worth memorizing on its own: in Blueprint, “asset” and “class” are the same object — one .uasset file is one class, and two classes means two assets. In Verse the file is just a container: a .verse file may hold one class, or five classes plus three functions and an enum. The file name does not even have to match the class name (the official style is to keep them the same so things are easy to find). “One file, one class” is a habit in Verse, not a rule.

One more difference to file away now: a Blueprint asset is binary — only the Unreal editor can open it — while .verse is plain text, openable in Notepad and diffable line by line in Git. That has real consequences for collaboration, and it gets its own extra page at the end of this lesson.

2. Part by Part: A Minimal Verse Class

The nine lines below are a complete Verse class that compiles and runs. Every step you take in Blueprint, it takes too:

my_door.verse
using { /Fortnite.com/Devices }
using { /UnrealEngine.com/Temporary/Diagnostics }

my_door := class(creative_device):

    DoorName:string = "North Gate"
    var OpenCount:int = 0

    OnBegin<override>()<suspends>:void =
        Print("{DoorName} is in place")

1. using { /Fortnite.com/Devices } — which asset libraries this class may reach into

The job of those using lines is to announce “the code below needs things from these libraries”. /Fortnite.com/Devices is where creative_device lives; /UnrealEngine.com/Temporary/Diagnostics is where Print lives. Without the using, the compiler will not recognize the names you use below.

Blueprint has no move that looks exactly the same; the closest thing is the question “which asset libraries can this Blueprint reach into” — you enable a plugin in project settings, or a module’s assets are visible in the Content Browser, and only then do its nodes turn up in the right-click search box. The difference is that Blueprint spreads every available node in the engine out in front of you, while Verse asks you to name them one by one at the top of the file. That explicitness buys readability: one glance at the file header tells you what this class depends on. The full rules for using — modules, paths, name collisions — are the next lesson’s subject.

2. my_door := class(creative_device): — create a Blueprint Class and pick its parent

This line is the equivalent of the asset you get after clicking through “Blueprint Class → pick Actor → name it BP_MyDoor”. It breaks into three pieces:

The trailing colon plus a 4-space indent on the next line is the old rule from last lesson: indentation is ownership. Every line indented deeper belongs to this class.

3. Fields inside the class — the variables panel

DoorName and OpenCount, indented one level, are the class’s fields — they are the Variables section of the My Blueprint panel. Translated word for word, DoorName:string = "North Gate" says: add a variable, name it DoorName, set Variable Type to String, set Default Value to “North Gate”.

The difference sits in the word var. A Blueprint variable can take a Set node from birth; Verse is the other way around — it is immutable by default, and if you want a value changed at runtime you must write var in front of the declaration. So DoorName is an engraved name tag, and var OpenCount is a slot whose contents change while the game runs. The full story of constants, variables and set is Lesson 8; here you are just learning the faces.

4. OnBegin<override>()<suspends>:void = — Event BeginPlay

This is the line where newcomers consider quitting: six parts crammed together. But the whole line says exactly one thing — “I am overriding the parent’s Event BeginPlay”. One part at a time:

Part Read as What it maps to in Blueprint
OnBegin “when the show starts” The red Event BeginPlay node itself. The moment the game experience starts, the engine fires it for you; you never call it by hand. Function names use PascalCase (capitalized), the exact opposite of the all-lowercase-with-underscores style used for class names
<override> “the override badge” This is “override a parent event”: in the My Blueprint panel you pick a parent function from the Override dropdown and the editor generates a version you can rewrite. Blueprint’s UI guarantees the function you picked really exists on the parent; Verse has no UI, so this badge declares it to the compiler instead. Leave it out and the build fails
() “takes no parameters” The parameter list — the input pins on the event node. OnBegin accepts nothing at all, but the empty parentheses can never be skipped
<suspends> “the can-wait badge” Declares that this function may wait partway through — you can put a Delay-style node inside it (in Verse that is Sleep). The parent’s OnBegin wears it, so your override must wear it too; lose one badge and yours no longer matches the parent’s
:void “nothing to hand in” The return type. void means nothing is passed back out — the Blueprint equivalent is a Return node with no output pins: it just does the work
= “is defined as” The declaration ends here; the chain of nodes that actually runs starts on the next line, indented one level deeper

For now the memorization strategy is blunt: learn this whole line verbatim. Its official meaning is “override this function to add custom logic when the game experience begins”. Incidentally, OnBegin has a twin — OnEnd<override>():void = — which runs when the experience ends and carries no <suspends>.

Snap the four pieces together: using is this class’s list of asset libraries, class(parent) is creating the asset and picking its parent, the fields are the variables panel, and the OnBegin block is the event graph. Everything you spend a few minutes clicking through in the Blueprint editor is nine lines of text here.

3. How to Actually Run It: Today That Means UEFN

The class is written — how do you make it move? Two things must be kept apart here: how a class is written is a rule of the Verse language, while how it is mounted, compiled and placed into a world is a rule of the runtime environment. The first is stable; the second will change.

Today, the only place that genuinely runs Verse is UEFN (Unreal Editor for Fortnite) — Verse has been running in UEFN production since March 2023. So the four steps below are the operating manual for today’s runtime, not the lesson’s subject matter:

  1. In UEFN’s Verse Explorer panel, right-click your project name → Add new Verse file to project, and choose the Verse Device template. It generates a .verse file containing exactly the skeleton from the last section;
  2. Write the class into it, go back to UEFN and press Ctrl+Shift+B (Build Verse Code in the Verse menu). Note that it compiles every .verse file in the project at once — unlike Blueprint, where each asset compiles on its own;
  3. Once the build succeeds, my_door shows up in the Content Browser. Drag it into the level exactly as you would a Blueprint asset — only instances actually placed in the level execute, and dragging in two gives you two copies of the logic running independently;
  4. Click Launch Session, and whatever Print writes appears in the Output Log panel and on the game screen.

Why must you write class(creative_device) before it can be dragged into a level? Because in today’s UEFN, creative_device is the parent class of “things that can be placed in a level” — and that requirement comes from Fortnite as a runtime, not from the Verse language. Verse is perfectly happy to let you write an ordinary class that inherits nothing; it just cannot be dragged into a Fortnite level.

This is exactly the layer that changes tomorrow. In UE6, Epic merges UE5 and UEFN into a single engine and brings Scene Graph — a gameplay framework built on Verse from the ground up, replacing the Actor inheritance tree with entity + component. Under that framework, the class you write is attached to an entity as a component rather than inheriting creative_device and being dragged in (Lessons 26–27 cover this in detail). UE6 Early Access targets the end of 2027; Actor and Blueprint are fully supported in UE6 Early Access and the early releases, and deprecation waits until Scene Graph is mature enough — with no date announced.

But notice what changes: the mounting mechanism — what the parent is called and how the thing enters the world. name := class(parent):, fields as variables, <override> as “override a parent event” — the way a class is written does not change by a single character. What you drill in UEFN today is what you use directly in UE6 tomorrow.

4. Line by Line: The Moment the Class Wakes Up

Snap this lesson’s parts together and watch it wake up one line at a time. The my_door below has two extra lines: three seconds after the opening it bumps OpenCount by one and reports again. Hit “Run Next Step” — every note tells you which Blueprint move that step is.

my_door.verse
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }

my_door := class(creative_device):

    DoorName:string = "North Gate"
    var OpenCount:int = 0

    OnBegin<override>()<suspends>:void =
        Print("{DoorName} is in place")
        Sleep(3.0)
        set OpenCount += 1
        Print("{DoorName} open count: {OpenCount}")
Output Log

Hit “Run Next Step” to watch the code execute line by line.

Compare lines 7 and 8. Both are “add a variable in the variables panel”, but Verse forces one extra decision out of you: is this value ever going to change? Only then do you write var. Anyone opening your class can see at a glance which values are fixed and which are live.

Blueprint Cross-Reference

Break “build a class” into six moves and line the two sides up. The differences column is the point.

How you do it in Blueprint How you write it in Verse Difference
Create the asset: right-click in the Content Browser → Blueprint Class, producing a .uasset Create a .verse text file and write one class declaration inside it In Blueprint, one asset = one class; in Verse the file is only a container and may hold several classes. The file name and the class name need not match
Pick the parent: choose Actor / Pawn / a custom parent in the creation dialog The name inside the parentheses of class(creative_device) Changing the parent in Blueprint means Class Settings → Parent Class dropdown; in Verse you change that one word
Variables panel: My Blueprint → Variables → add a variable, choose Variable Type, fill Default Value A field indented one level under the class: DoorName:string = "North Gate" Blueprint variables are writable from birth; Verse is immutable by default, so anything that takes a Set must be declared var
Event Graph: pick BeginPlay from the Override dropdown, drag exec wires off the event node The lines indented under OnBegin<override>()<suspends>:void = Blueprint expresses order with wires and guarantees a legal override through the UI; Verse expresses order with indentation and declares the override to the compiler with the <override> badge
Compile button: the toolbar Compile, which builds this one Blueprint asset Build Verse Code (Ctrl+Shift+B) Blueprint compiles asset by asset; Verse compiles the whole project at once, so a mistake in any single file stops everything
Place it in the level: drag the Blueprint asset into the Viewport, producing an instance After a successful build the class appears in the Content Browser and is dragged in the same way In today’s UEFN only a Verse class whose parent is creative_device can be dragged into a level — a requirement of Fortnite as a runtime, not of the Verse language

Nearly all of these differences grow from the same root: Blueprint stores classes as binary assets and keeps them correct through editor UI; Verse stores classes as plain text and keeps them correct through the compiler. You cannot pick a nonexistent parent class in Blueprint because the dropdown only lists real ones; in Verse you can absolutely mistype a parent name, so the compiler has to catch it at build time. By the same logic, the <override> badge is unnecessary in Blueprint — the Override menu is itself the proof. Text loses the protection of UI, so it buys it back with explicit declarations.

The second root is compilation granularity. Blueprint assets compile separately, and one broken Blueprint does not bother the others; Verse compiles the whole project in one pass, which exposes cross-file errors immediately at the cost of letting a typo in any one file halt everything. That is why “reading compiler errors” is a required course in Verse rather than an elective — see this lesson’s first extra page.

5. Level Challenge ★

One fill-in-the-blanks plus three multiple-choice questions. Correct answers earn stars; wrong answers retry freely, no punishment.

my_gate.verse
using { /Fortnite.com/Devices }
using { /UnrealEngine.com/Temporary/Diagnostics }

# Create a class whose parent is creative_device
my_gate := ____(____):

    # Override the parent's Event BeginPlay
    OnBegin<____>()<suspends>:void =
        Print("My first Verse class is online!")

In Blueprint, the whole routine of “right-click → Blueprint Class → pick parent Actor → name it” maps to what in Verse?

The <override> badge on the OnBegin line corresponds to which Blueprint action?

Which statement about “running Verse in UEFN today” and UE6 is accurate?

Further Reading

Technique · EXTRA

How to Read a Verse Compiler Error: File, Line, Column, Code

Verse errors come in three parts. Learn to take one apart, learn the five a beginner hits most, and errors turn from a wall into a map — with a side-by-side against Blueprint’s Compiler Results panel.

Open the extra →

Deep Dive · EXTRA

Where .verse Files Live and How They Get Referenced

How Verse code is organized in a project, how files relate to modules, and exactly what plain-text .verse buys you over binary .uasset in version control and teamwork.

Open the extra →

Advanced · EXTRA

What “Dragging a Blueprint Into the Level” Really Is in Verse

The class is the blueprint drawing; the instance is the thing on the field. What instantiation actually is on each side, and why a Verse class field may be left without a default value.

Open the extra →