"Only exactly matching structures are considered compatible" Error

I have a User Widget with some exposed variables as part of an inventory system that I’m creating for a local multiplayer game. One of those exposed variables is a structure called ‘Slot Contents’ that I created. The input for that is a structure of the same type from the player.
Initially, there was no issue with the system, but while I was working on optimizing it, a weird problem started occurring.

Whenever I would close the project and open it again, the Slot content variable would be disconnected. When I try to reconnect it, it gives a message saying “Only exactly matching structures are considered compatible”. However, if I create that same create widget node again, or even copy-paste that same node and then try to connect to the exposed variable, it works perfectly.

The problem repeats every time I close the project and open it again. It makes no sense to me.

I’ve attached a Screenshot of the issue for reference. The Create Inventory Slot Widget on top is the newly created one and the slot content variable is able to connect there. But the node below is that is the ‘create widget’ node that already existed and I’m not able to connect the Slot Content Variable there.

e2858c5b55224930550c5e7d47bfec2205191168.jpeg

Any help would be greatly appreciated! Thank you in advance!
https://forums.unrealengine.com/core/image/gif;base64

This can happen when modifying a structure that is already in use in blueprints, but seems to be more rare of an occurrence with later versions.
For some reason the editor has had problem updating/replacing that variable.
My suggestion would first be to add a new variable to your widget of your struct type and see if that one works better. If so, delete the old one.

That fixed it for now. I just deleted the previous structure variable and created a new one and the problem hasn’t appeared again. Thank you!

2 Likes

Love when a hail mary google search returns the exact answer to a niche problem I’m having. Thanks all! :smiley: