TMaps in Blueprint / Details Panels are awesome - but can we fix this pls.

I quite often use TMaps with Enums as the keys (I know, you could swap for an array easily - but that’s not always possible or useful). For example, here’s a TMap that contains a list of explosion effect templates to use when hitting a surface:

037870eba14e6cd657ce24ad11defa38aaf39a12.jpeg

Trying to add items to this is irritating, because of this. Can we not just fix this so it uses the next available value? Get’s very cumbersome to work with otherwise.

f6648c5165a92eee1806d894246c81d224340e23.jpeg

TMap is container which doesn’t care about order of element so you can’t just list it and save it to asset.

There’s exactly the same issue with C# dictionary in Unity :wink:
And in both engines you can create array/list of 2 element structs. I know, not that easy to use as hyphotetic statically editable TMap/Dictionary :wink:

He’s just asking for the blueprint editor to temporarily generate a valid, unique key on addition is all. Makes perfect sense and is totally doable, just needs a bit of special-case handling based on the key type.

^ Yup, exactly that.

Offtopic:
Why don’t you save an array of your explosion effects in your Physical Material?
Give it a function “get Impact Effects” which returns an effect based on Parameters/Whatever you like

That’s working backwards, I want actors to be able to specify their own explosion data for each physical material they hit - not each physical material specify explosion params for every actor that hits it.