Object Reference is not compatible with Widget Object Reference

Hello, I updated to UE.5.2.1
When I am trying to cook my project I get this error message " Object Reference is not compatible with Widget Object Reference"

I have a pause menu widget
and inside the pause menu, I am changing the visibility of another widget (settings widget)

This worked before but now I cannot COOK or PACKAGE my project.


image

The issue seems to be that I can no longer connect the " UI SETTINGS WIDGET 149"
into the “SET VISIBILITY - Target”

something had to of changed in the latest UE5 version that made this no longer compatible.
is there another way around this? do I need to cast somehow?

  • how certain are you the errors refer to the nodes you’re showing?
  • is this a project that was developed in UE4 and then converted to UE5?
  • is UI Settings a User Widget (has many native elements inside) or a pure native element, like a button / border / text block?
  • try using 2 separate Set Visibility nodes, one for each widget. I sense UE5 might be getting confused; what you’re showing above should work fine.

I updated from UE 5.1 or whatever the version before that.
This error only shows for cooking and not in the game.
when cooking I get this

reading it, it says “Can’t connect pins Object and UI Settings Widget 149”
and invalid pin connection,

I will try using two different visibility nodes,
the UI settings is a collection of other widgets.
image

How certain I am it’s that ? ( just unplugging it fixes the COOKING )

I’d investigate the way this element is added to the viewport / another widget:

image

Is it spawned dynamically?

The “UI SETTINGS WIDGET” is a plugin.
and it might be possible that the plugin is not up to date, but the weird thing is,
that the game works just fine Standalone or in Editor
but as soon as i cook i can’t.

I have managed to find a workaround, idk if this is the way it’s mean to be done, if it is, then it’s a bit annoying.

rather than just changing visibility
i am rendering another HUD on top of the Pause menu.

You could always try to add it as a child to the main menu dynamically, insert it into a container, even a Named Slot could work.

I am not too sure about how I would go about doing any of that,
but now I have another error.
image

the 2 bottom errors i have no clue why they are there, as those don’t exist anymore and i have refreshed the BP’s.
and for the top one I have it specified??!
image

There is something really wrong with that plugin. Assuming you did not make it yourself, consider talking to its creator.

Okay i have already spoke to him, just waiting for new reply,
I might just abandon the plugin and try to recreate it…

1 Like

In the meantime, replace this widget with anything else just to confirm you can get the build cooking. At least you’ll know whether it was the culprit or something else is messing things up.

Yeah, it does, as soon as I stop using the plugin it works.
image
it just doesn’t make much sense why cooking it fails but playing it works.

Maybe? I’m not an expert on packaging :expressionless:

just tried, it doesn’t seem to fix it.
but thanks :frowning: