Hello,
DataRegistry.h holds several hints that it should be possible to have data of different types in same registry (specifically subclasses of the registry’s ItemStruct) (e.g. this comment from the file)
/** Returns the struct used by this registry, everything returned will be this or a subclass */ const UScriptStruct* GetItemStruct() const;
Furthermore GetCachedItemRaw has OutItemStruct output parameter, which suggest that it contains the type of the ItemStruct returned, and also template <class T>const T* GetCachedItem seems to support retrieving items of subclassed types.
However, GetCachedItemRaw (actually all functions that have OutItemStruct output parameter) ALWAYS just set the OutItemStruct to the DataRegistry’s ItemStruct
OutItemStruct = GetItemStruct();
It seems to me that the function template <class T>const T* GetCachedItem can actually never work with any other template parameter than the registry’s ItemStruct (the ensureMsgf will always fail for anything else, as TempItemStuct will always be the registry’s ItemStruct and nothing else).
Am I missing something here? Is there a way to use this feature in the current version? Or is it a planned feature that doesn’t work yet?