Hi, here’s one I’ve been trying to figure out for days.
In our code we have a few FSoftObjectPath based references. Since this is just a string path reference it doesn’t ensure it gets packaged.
Now of course I could make all those hard references (either by putting some dummy instances in the level, or anywhere in the blueprints), but the problem with that is that then it gets loaded right away so the levels then take longer to load. We’re using soft references for a reason though, for instances for stuff that is not needed every time you run the app, but only sometimes and can be thus loaded later.
At this point I use +DirectoriesToAlwaysCook to include all the assets, but that’s not very handy as it requires very precise folder sorting, if you don’t want to include stuff that isn’t used at runtime by the packaged app.
My research on the topic shows that PrimaryAssetLabel is the thing I should probably use, but I haven’t been able to successfully set it up to do what I want. The documentation is rather vague.
Assume I want to just include two specific assets (in reality there’s more of them, but once I am able to set it up for some, it will be easy to set it up for the rest). One is a LevelSequence and one is a Movie Pipeline Queue asset:
[Image Removed]
and another one is a Level Variant Sets asset.
I tried creating a PrimaryAssetLabel, set the cook rule to Always cook and then added those asset references as Explicit Assets. Like this for example:
[Image Removed]
It wouldn’t however add it to the package. I wasnt’ able to load it and also couldn’t see it among the cooked assets.
I figured that maybe it wasn’t able to find the label so I also tried messing around with the Asset Manager settings in the Project settings, but again, no luck.
Can you please advise?
Regards
Jan