[bug]4.5.1 REINST in UMG - reference lost

Every time I’m using widget swicher after opening/closing editor I’ve REINST in my widget variables. I can’t cook the game as well.

Here is attached UI (it won’t compile on your end you would need to delete everything connected to game state / game instance but it’s small shouldn’t take much time) Dropbox - Error
the problem is in MainMenu which have widget swisher and there Cockpit and Garage widgets. It’s losing Cockpit reference.

Basically this issue is preventing me from releasing the game.

Hi intoxicat3,

It looks like you are getting circular references between the widget bps. We are still working to improve the workflow of blueprint to make it harder for this type of error to occur in the future. This fix is not planned for 4.6, just as a heads-up.

What you will want to do to prevent the error is to dispatch events from the widget (or otherwise emit events to the other blueprints) instead of directly modifying their properties from the widget. The more changes and calculations that are handled outside of the widget itself, the better off your blueprint system and UI will be. I hope that helps you.

Cheers,

Alexander

Thanks for answer. Yea I know about circular references issue and I’m trying not to do them.

Where I’m modifying properties in the example you have downloaded? What exactly should I chance to get it working?

There are a few places in the Widgets where there are casts to other actors and I can see a few float properties are being set by the Widget. It’s hard to specify because the assets’ casts have bad reference errors, so they do not have the casted-to actor names displayed.

Essentially, if you find yourself setting a variable in another BP via a cast in your widget, change that to an event dispatcher. This will require a little bit of setup in the BPs that are being communicated with (binding/assigning the events). According to the UMG team it will help with the circular references and also improve the functionality of your UI system once implemented. Let me know if that information helps at all.

Yes - it helps a lot. This should be noted somewhere for everyone working on UMG - “don’t assign variables”, “use events”. Again - thanks!

Ey thanks for this question. It was driving me crazy …

When creating widgets from other widgets and trying to assign properties to the child widgets the same problem happens.

So now I’m using event dispatchers for everything …

I’m still getting this issue even when I use events. It seems that if there are two widgets that have references to each other, I get this problem no matter what :frowning:

Hi Baron, could you make this into a new bug report question and include some screenshots of the offending blueprints? That way we can help you debug what is happening and investigate it further.

Thanks!