I’m currently doing a sort of “Database” UDataAsset that gets created in code. In it, there is a TMap with DataAsset A as keys, which are mapped to other DataAsset B as values.
For various reasons, I have to do it this way to “expand” DataAsset A with more data (I can not edit the definition of DataAsset A).
I used the following TMap:
TMap<TWeakObjectPtr<UArticyNode>, TWeakObjectPtr<UArticyNodeExtension>> ExtensionMapping;
When I generate the DataAsset via the AssetRegistry and save it, it works as expected. It’s in the content browser, I can open it and look at the contents.
When I restart the engine and then interact in any way with that asset, the engine crashes with an assert error in Property.cpp at line 1375.
uint32 UProperty::GetValueTypeHashInternal(const void* Src) const
{
check(false); // you need to deal with the virtual call
return 0;
}
When I replaced the WeakObjectPtrs with regular C++ raw pointers, it worked. Why is that and what does a Blueprint Map with the same contents use instead? Raw pointers, smart pointers, which kind?