The UE5 C2338 error (Your class is missing GENERATED_BODY()
) occurs when a UObject or AActor-derived class doesn’t include the GENERATED_BODY()
macro. This macro is essential for Unreal’s reflection system. To fix this, add GENERATED_BODY()
inside your class declaration. For example:
UCLASS() class MYPROJECT_API AMyActor : public AActor { GENERATED_BODY() };
This resolves the Unreal Engine 5 reflection error and ensures your class compiles correctly.