Monday, March 2, 2015

Widgets in UE4: looks promising, but you probably want to wait a bit longer

For the past few months I was working with widgets in Unreal because, well, there isn't much left for gameplay and we were short on UI people. It certainly looks promising compared to most of the other UI stuff I have used(see: Unity default UI), but it is so buggy that I won't recommend shipping anything with widgets at this point.


What I am seeing at this point:
Bugs: "remove from viewpoint" was replaced by "remove from parent" in the later versions and it does not always work that well, sometimes the UI component was not removed and it is better to set the component visibility to hidden before removing it.
Another bug I found is that the widget animation editor will not allow you to drag your marker around and set your keyframe, when that happens, the section appears grey. It could be fixed by restarting the editor, and it took me 2 hours to realize it.

Undocumented methods: my widget appears grey in all screen setting, took me two days to play with post processing and everything else before I realize you should always mark your widget as "activated", or it will appear grey. There was nothing said about this in the official tutorial. On the bright side, I fixed a few bugs, migrated the most problematic code from blueprint to C++ and improved the health bar quite a lot, all because I thought it would be cool to trust the comment when they said "activate" decides whether player can interact with the widget.

Lack of functions in general: The ability of having 3D widgets and having 3D widgets that always faces the screen was added really late, and by 4.7 the screen space rendering still bugs out sometimes. To adjust the transparency of certain element that is not a picture, you have to adjust the color value too, which is just weird. When doing our health bar, the progress bar widget only allows adjusting the "fill color and transparency", so I ended up drawing another black progress bar and adjust the transparency of that box, just to create the illusion of a border.



Widgets also lacks integration with C++ code, last time I checked , the widgets are not even documented well in the API. I would love to do something more with widgets but having everything done in blueprint is scary :/

No comments:

Post a Comment