Custom Structs in UI

Hi,

I was trying to make arrays of custom structs editable via the UI.

Currently inside the UI an array of the custom structs looks like this.

And my struct has the following definition

UENUM()
enum EJointType
{
	BALL_AND_SOCKET,
	HINGE,
	DISTANCE
};

USTRUCT()
struct FJointConstraint
{
	GENERATED_USTRUCT_BODY()

	FString					                JointName;
	TArray<TEnumAsByte<enum EJointType>> JointType;
};

How would I go about to make the fields of the struct editable via the UI ?

Many thanks !

Best,

darkZ

Many thanks for the quick and detailed reply. This seems like it would work. I will try it out and if doesn’t work then I will come back with more questions :slight_smile: I will mark the question as answered for now. Thanks again.

Hi darkZ,

What you want to do can be accomplished with a so called Detail Customization, which is a special class deriving from IDetailCustomization that you can register and which tells the details view how to present your structured data.

There are many examples of such customizations in the code base. In particular, many of the built-in struct types have customizations implemented in the DetailCustomizations module. Some other modules, as well as plug-ins also implement customizations. Just search for IDetailCustomization and you should find plenty of inspiration for very simple and very complex use cases!