Game development

Stage 2 · Lesson 4 of 8

C++ in Unreal: UCLASS, UPROPERTY and UFUNCTION

Programming for games

is standard C++ plus a reflection system, which lets the engine see and use your classes. You switch it on with macros, short markers placed above your code. UCLASS registers a class with the engine.

UPROPERTY exposes a variable to the editor, to , to saving and to (the engine freeing memory that nothing uses). UFUNCTION makes a function callable from Blueprints. The usual pattern is core systems in C++, with content and tuning in Blueprints that inherit from your C++ classes.

Learn plain modern C++ first, including classes, references and . Then learn Unreal types such as FString, TArray and TSubclassOf. Studio gameplay roles usually expect this.

Common trapkeeping a raw pointer to a without UPROPERTY, so the garbage collector frees it and the game crashes later.

A question to check yourself, an AI practice session and 1 cheat sheet entry come with the full roadmap. Unlock

Resources for this stage

Start with· follow one of these

Practise

  • Free mentored exercises in C# and C++ to strengthen the language outside the engine

Keep handy

Also worth your time

Mark this stage as not done?