Structs

Reference to creating and implementing structs for gameplay classes.

Windows
MacOS
Linux

Structs are data structures that help you organize and manipulate related properties. In the Unreal Engine, they're recognized by the Engine's reflection system, but are not part of the UObject ecosystem. As a result, they are faster to create than a UObject with the same data layout, and support UProperties, but will not be managed by the Garbage Collection system and cannot provide UFunctions. Keep in mind that UStructs cannot be used inside classes.

To make a struct into a UStruct, use the USTRUCT tag above the struct's definition, and include GENERATED_BODY() as the first line within the definition, as follows:

USTRUCT([Specifier, Specifier, ...])
struct FStructName
{
    GENERATED_BODY()
};
Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback