March 2019
Intermediate to advanced
708 pages
17h 9m
English
UE4 generates and manages a significant amount of code for your custom UCLASS. This code is generated as a result of the use of the UE4 macros such as UPROPERTY, UFUNCTION, and the UCLASS macro itself. The generated code is put into UserProfile.generated.h. You must #include the UCLASSNAME.generated.h file with the UCLASSNAME.h file for compilation to succeed, which is why, by default, the editor includes this automatically. Without including the UCLASSNAME.generated.h file, compilation would fail.
It is also important to note that the UCLASSNAME.generated.h file must be included as the last #include in the list of #include in UCLASSNAME.h.
Here's a correct example:
#pragma once#include "CoreMinimal.h"#include "UObject/NoExportTypes.h" ...
Read now
Unlock full access