Soft references showing as hard references (UE5.1)

I downloaded the Lyra project, created a new widget class (X), added a Soft Reference variable in the Character Default BP, opened the Reference Viewer of the Character Default BP, and it said that it had a hard reference to class X. Yet the only thing I did was declare a soft reference. Any idea of why this happens?

Also, I know this issue was tackled in:

But I do not understand the answer :slightly_frowning_face:

1 Like

Same thing happens to me in 5.1.

I watched every video I could find and read articles and blog posts so I’m really starting to understand what are soft and hard references, and how to use them. However, I’ve been scratching my head trying to restructure my game’s blueprints properly with this new knowledge. Every time I setup a soft reference it always appear as a hard reference in the reference viewer (i.e. no pink connection, only shows up with the “hard reference” filter and shows up in the size map)

Based on this article which is referenced everywhere, I tried making the most straight forward test objects to see if it was me who did not setup the references properly or if it was a bug.

Here are my two test blueprints

image

Simple behavior based off of the one from the article. Everything works properly when I load the level

Still appears as a hard ref in the viewer

Also tried closing and reopening the engine to no avail.

I don’t know what to do at this point. I’m completely baffled. I’m considering migrating my project to a newer version of unreal because every one I found that are having this issue are also on 5.1.

1 Like

So to be honest, I don’t really know why soft refences are coming up as hard references in the viewer either but I do believe that because you are first async loading the asset and then casting immediately after that, you’ve just nullified your soft reference there. I believe you need to Asyn load it and then just plug it into the location you want it to go like so:

If anyone else figures out why this problem still is happening I would appreciate it. I seem to be having soft reference show up as hard references in my viewer still.

Variable - has a hard reference to the class of its type inside itself. For example, if you create a soft reference to “Object of class A” - you will get a hard dependency on “Class A”
Cast node - has the same effect.

Obviously you are deceiving yourself…

1 Like