Soft reference still being packed as hard reference would

I have a blueprint that has references to some data tables. I made it so that these are soft references instead of hard references and using the reference viewer’s ‘show soft references’ check I’ve made sure that these are in fact soft references, still they are treated as hard references and packed with said blueprint.
One weird thing is that they are ‘white lines’ instead of the expected red ones as is the case for all soft references (right?)

What does this specific line represent (both white and red)
Reference viewer

Did you try a ‘size map’ on the blueprint? That will reveal the truth better than the reference viewer, I think.

I just did. It doesn’t show those soft referenced files.
Still while packaging, it will drag those soft referenced assets (they are data tables if that makes any difference) into it’s chunk file, instead of letting them be in their own chunk file.

Do you have any idea why it’s doing that?
Also about the above image, do you know what it means that it’s showing me both white and red lines in the reference viewer?

I don’t know if you saw this

I recall him talking about soft refs and packaging, but don’t know if he covered this exact issue.

I don’t know about the viewer lines, but I seem to recall that’s also touched upon.

Will check and update the thread if I find a solution.
Thank you for your time.

1 Like

Soft references are still pulled in for cooking, just not when loading the asset. That’s on purpose as if you have a soft reference to something you generally want it included into the build.

For chunking however that can have an undesired side-effect of overriding the soft-referenced asset’s chunking rules if the referencing asset has a higher priority cooking rule.

There’s a way around that. You can add the Meta property Untracked to a SoftObjectPointer / SoftClassPointer to make it not count as a cooking dependency. You’ll have to make sure you have some other way of pulling those assets into the cook then though, either through some PrimaryAssetRules or having it in an AlwaysCook directory.

For BP declared properties we don’t have a way out of the box of marking them as Untracked, however I have done it before and have instructions on modifying your Unreal Editor to support it here.

2 Likes

Thank you. That’s super helpful! My case is exactly like this, the chunk that has this blueprint has a higher priority so this is probably the same thing you mentioned.
I have it declared in cpp so I’ll definitely give this a try.

1 Like