TMap in Details Panel

Hi again,

When we have a TArray as a UPROPERTY inside a USTRUCT, it renders in details panel automatically with our data, like so :

https://docs.unrealengine.com/latest/images/Engine/UI/LevelEditor/Details/Properties/Array/array.jpg

but when I use a TMap with FName as key and a USTRUCT with just a boolean as value, it doesn’t looks right in the details panel…

The code for better understanding:

USTRUCT()
struct FMyValueStruct
{
	GENERATED_USTRUCT_BODY()
 
	UPROPERTY(EditAnywhere, Category = Setup)
	bool MyBool;
};

USTRUCT()
struct FMyTMapStruct
{
	GENERATED_USTRUCT_BODY()

		UPROPERTY(EditAnywhere, Category = Setup, AdvancedDisplay)
		TMap<FName, FMyValueStruct> DisplayTMap;
};

I’m adding bone names as key in my source file…

In Editor, DetailsPanel it display the field like:

DisplayTMap | ((Bone1, )), ((Bone2, )), ((Bone3, )), ((Bone4))

Not as a TArray does, like in the above example:

Am I doing something wrong or TMap doesn’t have a default display to details panel?

Also, the core idea behind it is that I want to display the name of a bone in left side of the details panel, not the array index number, like TArray does, So, for this reason, I’m trying to use TMap.

Yeah, TMap is not supported in the details panel yet. It simply displays a text box with the string representation of the value.

Thank you !

1 Like

This documentation page seems to indicate that TMaps should display as expected when using the UPROPERTY macro. I tried this on both a BluePrint and a DataAsset with little success. Any idea why?

When I was dealing with it UE doesn’t gave support for TMaps even using Uproperty Macro. After 4.13 or 4.14 it was included! Thanks at all.