Stage 2 · Lesson 4 of 8
C++ in Unreal: UCLASS, UPROPERTY and UFUNCTION
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
- CourseFreeUnreal Engine Learning (Epic Developer Community)
Epic Games
Epic's free courses: Your First Hour and Your First Game teach the editor and Blueprints
- CourseFreeLearnCpp.com
LearnCpp.com · Beginner
Free, thorough modern C++, so Unreal C++ is only new macros, not a new language
Practise
Keep handy
Also worth your time
How Unreal C++ differs from standard C++ and how it fits with Blueprints
- Game Programming PatternsGo deeper
Free book on the state, observer, component and other patterns games rely on