Creating a USTRUCT

You may want to construct a Blueprints editable property in UE4 that contains multiple members. The FColoredTexture struct that we will create in this chapter will allow you to group together a texture and its color inside the same structure for inclusion and specification in any other UObject derivative, Blueprintable class:

Creating a USTRUCT

The FColoredTexture structure does have the visual within Blueprints appearance as shown in the figure above.

This is for good organization and convenience of your other UCLASS UPROPERTIES(). You may want to construct a C++ structure in your game using the keyword struct.

Getting ready

A UObject is the base class ...

Get Unreal Engine 4 Scripting with C++ Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.