"Phantom" hard reference in Widget that I can't remove

Hello all,

I’ve got this odd issue regarding the “Size Map” and “Reference Viewer” features in Unreal Engine 5.6.

For some context, I am currently cleaning up some of my old blueprints in an older project and I have encountered an issue.

I have the following blueprints: BP_TerminalInteract and BP_Overwatch.
BP_TerminalInteract contains a Widget called WB_TerminalUI.

Upon checking the SizeMap of BP_TerminalInteract, I’ve noticed the following:

image
(Do please ignore the monstruous size of BP_Overwatch. It’s the classic “God Class” beginner mistake that I am now attempting to correct slowly and steadily).

As you can see, BP_TerminalInteract’s size is massive as there appears that the Widget it has is referencing a class that shouldn’t be there.

Now, in an attempt to fix this, I’ve created a new blueprint called BP_ParentOverwatch that I intend to use instead. BP_ParentOverwatch has now been set as BP_Overwatch’s parent class.

This BP_ParentOverwatch has a normal size

image

I’ve replaced all the BP_Overwatch references in WB_TerminalUI, created a new variable and set it’s type to BP_ParentOverwatch. I’ve also deleted the old variable which was set to BP_Overwatch in the case that Unreal keeps some default values. The newly added variable is then set to the output, at begin play, of “Get Actor of Class (BP_ParentOverwatch)” node.

Afterwards, checking the Size Map of WB_TerminalUI still displays a hard reference to BP_Overwatch.

image

I then went ahead and verified the Reference Viewer of it, thinking I missed something, but this is where I am completely thrown off:

As you can see, there is nothing referencing BP_Overwatch anywhere. BP_TerminalInteract is only referenced by BP_Overwatch, but it doesn’t have a direct reference to BP_Overwatch.

I am unsure exactly whether the interface approach was completely useless as it wasn’t going to fix anything in the first place, or if perhaps I’ve missed something.

Would love some support on this.

Ps: Some potentially pre-emptive questions & answers:

  1. BP_Overwatch’s Reference Viewer doesn’t show any kind of incoming/outgoing reference to WB_TerminalUI (I’d send a screenshot, but it’s quite gigantic)
  2. Inside WB_TerminalUI, upon attempting to search for “Overwatch”, this is the output:

Let me know if there’s any other things I can clarify.

Thanks a lot for reading!

Well hard to diagnose could be a lot of things.

First as you say in the title can be “Phantom” reference left over if there is something in metadata however this is generally very rarely the case. However you can use Refresh All Nodes in the menu of blueprint, compile save, even rebuild if you are launching from IDE or using LiveCoding

I more likely think that the reference / hard ref is coming from

  • If you get actor of a class and cast after it.
  • If there are some functions, inside there could be some references. Could be even local variable in functions
  • A disconnected reroute
  • Interface or old interface event/function ref
  • Your UMG can be corrupted, try referencing completely new blank User Widget to see if that causes issue still.