I’ve got a Blueprint and it is showing a reference in both the Reference Viewer and the Size Map to BP_Interact_Base.
I’ve removed all hard references from the blueprint (at least it looks like I have) so I can’t figure out where this reference is exactly in my blueprint.
If I search for “interact_base” nothing shows up in the blueprint.
When a hard reference shows up in the Reference Viewer or Size Map, is there a way to find out where a hard reference is showing up in the blueprint code itself as I’m not having a lot of luck digging through the graphs and functions and finding anything?
I am not aware such a feature exists in the engine although it would be extremely handy. Some tips that I found useful for this:
use Find in Blueprints and the Find Results window in a specific Blueprint editor window
also make sure you check all variables including local ones as well as any function parameters (possibly including any blueprint base classes and interfaces that your class implements)
make sure the reference comes directly from the class that you are inspecting. It is possible the reference viewer shows indirect references from other blueprints that your class depends on.
Play around with the different reference viewer settings
also check the reference viewer for the “interact_base” as a countercheck
soft (class) reference of type X internally requires a hard reference to type X (the benefits of the soft reference comes into play when assigning a value Y. e.g. if you have soft class reference variable to interact_base there will be a hard reference even if there is no value assigned to the soft class reference or even if you assign it some other class.)
I don’t understand why the Reference Viewer can show that there’s a hard reference, but not point you to where it is. Very annoying. I’m spending hours trying to track one down.
Okay, a general tip after hours of pain and yelling at robots:
Export the Blueprint and open it in Notepad. Do a text search for the reference you’re looking for. Hurl it (and SOME, not ALL, of the surrounding text) at a robot and the robot should tell you what it (and the surrounding text) means so you can pinpoint the reference.
My issue was a GHOST WIRE reference, where the Hard Reference was stored in a REROUTE node. That’s why it didn’t show up in the main search.
To add to this, if you have as much as a single node or variable that references another actor, that actor will show up in the reference viewer, even if it’s not even connected to anything.
For example imagine you have a ‘Cast to’ or ‘Get actor of class’ in your graph. Their mere presence there is enough to create the reference, even if they are not connected to anything. If you took a variable, a custom event or anything out of them and you keep that in the graph, that will create the reference too. Like if you casted to another actor to get their ‘Health’ variable, and you deleted the ‘Cast to’ but didn’t delete the ‘Health’ variable and you forgot it somewhere in the graph, that will prevent the reference from being cleared.