I have a primary data asset that inherits from UPrimaryDataAsset. When I try to asynch load the asset, asset bundles that are marked within TInstancedStructs do not get loaded. For example, in this UPROPERTY I have defined an array of Fragments of type FCrimItemDefinitionFragment.
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = “Item”, meta = (FullyExpand=true, ExcludeBaseStruct))
TArray<TInstancedStruct> Fragments;
And in my ItemFragment.
USTRUCT(BlueprintType)
struct FCrimItemDefFrag_UI : public FCrimItemDefinitionFragment
{
GENERATED_BODY()
/** User facing text of the item name */
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Item|UI")
FText ItemName;
/** User facing description of the item */
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Item|UI", meta = (MultiLine))
FText ItemDescription;
/** The user facing icon of the item. */
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Item|UI", meta = (AssetBundles = "UI"))
TSoftObjectPtr<UTexture2D> ItemIcon;
}
I have the AssetBundles marked for the ItemIcon. But it does not load when async loading. I have confirmed, that if I place SoftObjectPtrs in the ItemDef directly, it loads the bundles appropriately.