So I’d like to have a Plugin (DLC) that has texture uassets in it that I will later load with
StreamableManager.RequestAsyncLoad . The textures need to be packaged into the Plugin and might not always be available if you do not have the DLC.
Previously I was including links to these textures in GameInstance with
UPROPERTY(EditAnywhere, BlueprintReadWrite) TSoftObjectPtr<UTexture2D> and then just accessing GameInstance later.
An issue is if I keep those references the textures will get automatically added to the main packaged build instead of the Plugin (DLC).
Instead I have attempted to move the references into a UDataAsset that is contained in the Plugin. This works for packaging as the textures are now in the Plugin and not the main game however I do not know how to access these references in c++.
If I attempt to create a link to this UDataAsset in something auto loaded like GameInstance or PlayerController then this link causes the textures to once again get packaged into the main game and not the Plugin.
Any idea how I can access these textures if the plugin exists without packaging them into the main game?