Please correct me if I’m wrong, but my understanding was that for TWeakObjectPtr keys, there is also TWeakObjectPtrMapKeyFuncs/TWeakObjectPtrSetKeyFuncs that allow them to be used safely in TMap/TSet respectively. You can do something like so:
`template <class Key, class Value>
using TWeakPtrKeyMap = TMap<TWeakObjectPtr, Value, FDefaultSetAllocator, TWeakObjectPtrMapKeyFuncs<TWeakObjectPtr, Value>>;
TWeakPtrKeyMap<AActor, FString> MyMap;`
This can’t be a UPROPERTY of course either.