UPROPERTY TMap with FVector as key

How can I get a UPROPERTY TMap to use FVector as a key? When I try to compile it with FVectro as key the compiler gives the error USTRUCTs are not supported as key types. FVectors work fine when the TMap is not a UProperty however. Anyway to work around that? As structs are incredibly useful as keys, especially FVector.

If something works but it does not work with UPROPERTY that means reflection system does not support it and there really no way around it if you mean wou want UI for it in editor.

Easiest option is to nto use UPROPERTY, but there might be some serious reason why it’s not supported and if you use TMap without Property there might not show you any error (as it’s bypassed by UHT) but problem still exists, so watch out on that.

You could try converting FVector to some different key type, like string. and make some extra nodes for setting that TMap so it easier to use it in blueprints with vectors

I am trying to use UPROPERTY because I keep getting the Assertion error, and it seems to be related to the UMap, reading around on the forums it seems like a garbage collection error, and setting the container to UPROPERTY is the fix for it. I’ll try converting everything to string and storing it that way.

TMap properties don’t currently support structs as map keys. This is because there are some engineering concerns that need to be overcome first. Map keys need to be hashable, and since properties need to work across blueprints and native code, we need to add GetTypeHash support to the reflection system and be able to define them for blueprint-only structs.

Steve