Custom Detail Panel; Array indexed by strings

I’d like to display an array of values, indexed by strings rather than numbers.
IE: given an array int[] = {0,0,10} and FString[] = {“Alpha”,“Beta”,“Gamma”}
Alpha [ 0]
Beta [ 0]
Gamma [10]

rather than
0 [ 0]
1 [ 0]
2 [10]

I have looked at the “tutorials” on the wiki; I use quotes because I have yet to find one that actually works. Could someone please explain how to do this in a way that doesn’t assume I’m an Epic senior programmer who needs a refresher?

You could possibly use TMaps, check this out and see if it helps you.

Problem is it renders that in a single bar
[((Alpha, 0),(Beta, 0),(Gamma, 10))]
rather than as a array. Also, adding new keys caused it to bug out, crashing the editor twice.

If anyone knows a way to get it to render vertically like an array, the crashing can probably be ignored as adding new keys won’t happen that frequently.

Get Keys array with this function:

And the loop thru like this:

TArray<FString> Keys;


for(FString Key : Keys) {
      UE_LOG(LogTemp, Log, FText::FromString(Key + ": " + FString::FromInt(Map[Key]));

This is example on Logs, you can do anything

If I wanted it in logs, I would have asked for logs. Look at the title: I want this in the detail panel.

Oh, thats quite not possible, currently reflection system does not support TMaps, only TArrays is supported from all container types. You might try to do something with this, but not sure if this will work:

you definitly won’t be able to use TMaps in blueprints or else you make nodes to operate specific TMap in C++

TMap support for reflection system and bluepruints overall was requested few times and it’s considered to be implemented in future

Remember how I said the “tutorials” on the wiki don’t work? That one is a prime example. It’s out of date, incomplete, and doesn’t explain what it is doing.

Do you know how to use Slate? If not you should start with that. Im not sure if you can do anything here as TMap is non existant for reflection system

I will try to review that tutorial tommorow and some how hint what you could do

No. Do you have a Slate tutorial that actually explains what the FUNC it’s doing? What the functions actually do? Because I couldn’t find one.

I remembered this training stream. It could be very useful, Also Noland is a guy to follow.

Good luck!

I’m afraid you might need to backward engineer it, by looksing on other code. I find out there whole module in engine dedcated to details property customization for various types

You can preform the same thing from any other module (including yours), you just need to remeber to manually register the customization as this module does

The key here is IDetailsCusmization IDetailCustomization | Unreal Engine Documentation