As you can see in the image I’m trying to resolve a soft reference in two places.
1st one is an actor in the world, that succeeds.
2nd one is an object and that one fails.
For both instances, i used the class picker to set the references.
Also, the references are exactly the same.
Still the actor succeeds and the object fails.
In our logic I’m also using the c++ equivalent: Get().
That also fails.
This is weird because we used this logic before 5.1 and then it worked fine.
Had anyone have some experience on this issue or advice for us?
Hi @Vi-So_Construct, I managed to reproduce this. But your assumption is incorrect. It’s not whether or not the parent class is an Actor or an Object, the actual issue happens when the variable isn’t public (the little eye icon on it is closed).
If I trace out the actual value of the soft reference at runtime I get different values depending on whether or not it’s public:
As you can see, one has the PIE (play in-editor) path fixed up, the other one doesn’t. There seems to be a bug in the engine where non-public soft references don’t get fixed up for PIE.
I’ll report this to the team, in the mean time to get around this error, make sure your property is public.
Hmm, actually, I just re-tested this on an empty repro project and now it fails on the Object, even if it’s marked as public! So ok, yeah there’s something definitely weird going on with Objects. I’ll update the bug ticket.