Do FSoftObjectPath and FSoftClassPath inject cook dependencies?

If I reference UDataAssets or BP classes via FSoftObjecetPath or FSoftClassPath? Are these guaranteed to be included in the cooked builds?

I develop using FSoftObjectPtr and have gotten passed the build phase and had cook errors which related to a my FSoftObjectPtr variables.

I’d be curious to find out for sure if this is true!

There seems to be a SkipSoftReferences option that can be passed when cooking. https://github.com/EpicGames/UnrealEngine/blob/46544fa5e0aa9e6740c19b44b0628b72e7bbd5ce/Engine/Source/Editor/UnrealEd/Classes/CookOnTheSide/CookOnTheFlyServer.h#L73

It has a comment saying

Don’t follow soft references when cooking. Usually not viable for a real cook and the results probably wont load properly, but can be useful for debugging

So I would assume it’s not set by default.

The answer is yes, by default, FSoftObjectPath and FSoftClassPath introduce cook dependencies. I was able to verify this with some test builds.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.