We were having issues with our blueprint data assets not being found by the asset manager until we found the following comment in DataAsset.h: “* With blueprint subclasses, use Data Only Blueprints (and not Data Asset instances) to properly handle data inheritance and updating the parent class.” Following that we changed all the blueprint data assets to be data only blueprints instead. Now the asset manager recognizes and loads them.
However, these blueprints can no longer be cast to their native parent class! I’ve tried using the “Load Asset Blocking” node in blueprints and then casting to the parent class - it never succeeds. I also tried doing this in C++:
TSharedPtr<FStreamableHandle> Handle{ Manager.LoadPrimaryAsset(MyAssetId) }; if (ensure(Handle.IsValid())) { Handle->WaitUntilComplete(); } UObject* MyObject{ Manager.GetPrimaryAssetObject(MyAssetId) }; UMyType* MyTypedObject{ Cast<UMyType>(MyObject) };
MyObject is valid and appears to be the expected blueprint directly inheriting from UMyType, but MyTypedObject is always null.
I have seen this kind of thing work before - there has to be something simple I’m missing!