Unreal Engine Reflection System

Information for programmers developing Objects to be used with Unreal Engine.

On this page

The Unreal Engine Reflection System encapsulates your classes with various macros that provide engine and editor functionality. When programming with Unreal Engine(UE), it is possible to have standard C++ classes, functions, and variables.

  • The base class for objects in Unreal is UObject. Each class defines a template for a new Actor or Object.

  • You can use the UCLASS macro to tag classes derived from UObject so that the UObject handling system is aware of them.

  • TSubclassOf is a template class that provides UClass type safety. It is useful for assigning classes that derive from a specific type. For example, you may expose this variable to Blueprint where a designer can assign which weapon class is spawned for a Player Character.

  • Classes can contain structs. Structs are data structures that help with the organization and manipulation of their related member properties. Structs can be defined on their own using the USTRUCT() macro.

  • Interfaces provide functions and additional gameplay behavior you can implement in multiple or different classes. Your player character can interact with a variety of Actors in the world. Each of these interactions can cause a different reaction to an event.

  • Metadata Specifiers control how classes, interfaces, structs, enums, functions, or properties interact with various aspects of the engine and editor. Each type of data structure or member has its own list of Metadata Specifiers.

  • UFUNCTION, and UPROPERTY macros make UE aware of new classes, functions, and variables. These macros are garbage collected by the engine. When specifying macros, you can edit and display them within the Unreal Editor.

Section Directory

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey