UMG visibility function broken in packaged build 4.17 ?

Hello,

When I package my project I see that in-game all of my widget that make use of the “visbility” function using a bind are not working. However, inside the editor everything work perfect.

No matter what type of code I put into the bind it never seems to take it into account in a packaged project it just always sets the widget’s visibilty to visible no matter what.

I’m thinking this must be a bug, as I’ve never experienced this before and everything I made is based on logic I’ve made months ago which all worked perfect in a packaged build.

Anyone experiencing this issue?

Also, I’ve noticed another strange thing. Sometimes when I close my project and re-open it some of the return nodes inside my visibility bindings are reset. Like normally there is a branch, leading to 2 return nodes, one visible, the other one hidden. But sometimes both return nodes are suddenly reset to visible. This has happened in multiple different widgets.

These are issues I’ve never experienced before in the 6 months or more I’ve been using UE 4.

I think some serious UMG bugs crept into 4.17. Either that or I’m going crazy.

I am starting to believe that the Unreal Engine Blueprint System is Buggy… If you hard code something, and if you go back later on to try to change it, it causes issues sooner or later…

As for the Build issue, it might be that with the new upgrade versions, the compiler might not have been updated to reflect all the new
changes from the blueprint code in the editor and as a result, might be skipping things out, causing the code to be built differently
in the build than what it is running in the editor… So the compiler might not be matching everything all up, or might not be processing some lines that were changed in the new version and just skipping them if the compiler has not been updated to reflect also all the
new changes in the engine.

I AM NOT an experienced unreal blueprint programmer with Unreal Engine, I don’t know how to build code in blueprints and usually follow what other people have done, but I do know a little bit about this engine, so I like alot of others I too need help from others to code my game in this type of engine… As I have got the choice and consequences system to try to set up… but I still have to set up also a save system that needs to hold hundreds of game values, but i don’t know how to do it, if I put it in a data struct, it starts to slow down the editor to a snail crawl when inserting in all those values into the struct, so is there another way to save the bulk data?

Now onto your issue with the widget resetting back to defaults instead of saving the changes. . ,I can only think of one thing, look at the Parent-Child Relationship. I think the linked parent always changes the children, so if you’re saving changes in the children, then they might be why it
keeps on losing the changes when the parent resets them.

Are you using the new compilation manager by any chance? It’s on by default in 4.17.

What’s that exactly? Where do I turn it off?

EDIT: I checked and saw that I have this turned on indeed. I couldn’t find much information about this feature though other than it supposedly speeding up project launch times? Can someone explain what this does exactly?

From the 4.17 patch notes:

For me, it did more than advertised. After transitioning to 4.17 I had major issues with widgets that were referenced by some of the child classes. It wasn’t visibility related, the owning child classes were flagging widgets dirty, not passing ExposedOnSpawn references and triggering additional issues - a mess, to say it lightly. Interestingly enough, turning the Blueprint Compilation Manager off sorted all those issues *automagically. *(or hid them - out of sight, out of mind, yay!)

Since I wanted the BCM on, I eventually ended up redoing the offending widgets, in some cases from scratch - I understand this is hardly a solution for a project in a later stage of development, though.

You could try recompiling both the widgets and the potentially affected blueprints with BCM off and see whether this affects the final product in any way.

Another thing to look into is to avoid creating widgets in GameInstance, GameMode, Controller, Pawn… - any of the overridable classes. Have a separate actor (or other actors) handle their creation and life span. I experienced tangible issues here after packaging, albeit in earlier engine versions.

I’m creating widgets in my player character as that is pretty much the only place I can do that for the purposes I need them. I think I’m going to leave BCM on for now as I’ve managed to fix my issue by simply restarting the editor and packaging again. Suddenly everything worked perfect. I’m going to take a leap of faith and hope it won’t happen again. If it does I’ll probably try turning of BCM. Thanks for the replies people!

I also got several issues with my Widgets only in packaged games since 4.17 and 4.18, I tried disabling BCM and creating the widgets on the level blueprint, but without any luck :frowning: do you have any ideas why this is happening? any other new feature on 4.17? I got everything working perfect on PIE and in Standalone

What seemed to have fixed this issue for me was updating to 4.17.2. Since we updated to this hotfix we no longer have this issue.

I’m working in 4.18.3 and experiencing the same issue where the game has a main menu in one vertical box and an options menu in another vertical box, both contained in my Main Menu widget so that when you click the “options” button, the main menu vertical box is hidden and the option menu becomes visible. Works when PIE but not in packaged game.

Here’s the blueprint set up: in TwinStickPawn, EventBeginPlay > Create Main Menu Widget> etc. then in the Main Menu Widget> OnPressed(OptionsButton)>Set visibility Main Menu(vertical box) hidden and Options Menu (vertical box) visible

Please advise if this is not this set up is not correct or if this is a known bug since 4.17. Also, I’ve tried turning off the BCM in Project Settings but this did not help.

I’m having somewhat similar issues with packaged build widgets, I have an inventory system that creates the slots on event construct and adds them as a child to a a grid panel, all the slots update on the editor without any issues (icon, text, etc), but on packaged builds either the first index or the last replace the slot information on EVERY slot, the item data inside each slot doesn’t change, so I’m able to equip and use the items, but that only occurs randomly, this also negates the ability of reloading weapons (I don’t even know…). This occurs for me when you use Create Widget, if you place the widgets manually on the designer it doesn’t happen, but this is obviously not a practical way of doing it since I’ll have containers that hold more than 2000+ items.

I only got this issue in 4.18, I’ve tried EVERYTHING possible with refactoring my code, from modifying the engine code to disable cooked widget trees on the widget generated cpp, to removing the slot “components” from the designer and adding them with Construct Object, to adding instanced as a class modifier and multiple other stuff on the inventory widget, I’ve printed out the icons on each slot and the icons/data themselves are correct.

For some weird, unknown reason, I managed to fix it by adding the widgets to the nativization list (But set as Disabled), This issue really busted my balls lol, I couldn’t imagine manually adding 2000+ widgets to a grid and adding them as an array lol

tl;dr widgets created using the create widget template and added as a child to a grid panel get overlapped by the first/last index, got fixed by adding the widgets to nativization list and set as disabled

@BioXide: I was able to resolve the issue using your method with a project updated to 4.18 from 4.15 as well as a menu created from scratch in 4.18 for testing purposes. Thanks for sharing your findings!

I’m having a similar issue in 4.18.3

I have a BPW that is the child of another BPW and the property bindings don’t work in the child when running packaged game. Works perfectly in the editor. Weird!

Edit: The nativization trick also worked for me! So weird!!