I just noticed a little bug with the TMap blueprint editor tab:
When you define a TMap variable and the key happensto be an Enum, you are forced to define the first enum value as last. Otherwise, a click on the plus sign will attempt to create a new entry with the default which was already declared.
So, to reproduce:
- Create a BP, based on actor
- Create an Enum and add the Values “Alice”, “Bob” and “Timmy”
- Create a variable of the TMap type in the blueprint and pick a TMap value type (for example Static Mesh)
- Add an item to the variable in the etails panel. An entry for “Alice” will be created
- Click again on “+” to add another entry
- This fails as another entry with the default value “Alice” already exists
- Change the first entry key to “Bob”
- Click again on “+”. This time it will work and a new entry with “Alice” as default is created.
Its a bit annoying this way.
Maybe that check on duplicates could be done on BP compile time, or intelligently pick an unused enum value for new entries?