UUserWidget* properties in custom Game Instance cause crash
The issue appears if there are any properties of UWidget* or UUserWidget* declared inside custom Game Instance C++ class in any form (directly, nested in ustructs, in arrays, maps etc.). When editing class defaults there is a standard option to select needed asset, but once pressed Compile the property gets cleared to none, once pressed Save, the editor crashes with stack overflow somewhere in UMG module.
I wasn't sure it was a bug, thinking that game instance constructor is called too early for UMG. Now I've solved the it by declaring the pointer as UObject* - this way the problem gone, the cost was an additional getter method and a much larger asset list for the edited property, i.e. risk of a wrong choise, so the problem still exists as a concept.
UPD: The workaround is not actually working. Though the pointers are edited, saved and available in code (debug uncovers them as usual objects) they turn null when using Cast() or they cause crash when using standard C/C++ typecast and then calling widget methods. So I'm still not sure whether this is a bug or something by design.
Follow this question
Once you sign in you will be able to subscribe for any updates here