Is there any way to store an array in a tmap?

I’m trying to use a TMap as part of my dialogue system, where the tvalue is an enumerated reference to the current conversation node, and the value is an array of FString conversation options:

TMap<EConversationNode, TArray<FString>> testMap;

This produces an error, “Nested containers are not supported,” which is pretty unambiguous, but is there any way to make this work? I have tons of features that would be much easier to implement if I could use lookup tables, but that’s all predicated on being able to store arrays as TValues.

As a workaround, you can put the array inside of a USTRUCT, for example:

struct FConversations
    TArray<FString> Entries;

TMap<EConversationNode, FConversations> testMap;

Ooh that works, thank you! :slight_smile:



It worked! Many thx