Not a bug, the WidgetBlueprint is an editor only class. You can tell because it's in a module in the Editor directory. UBlueprints should've been and hopefully will in the future. You need to reference the generated UClass instead, the "_C" object that's generated when you compile a blueprint, instead of the WidgetBlueprint. e.g.
"Class'/Game/W_UnitWidget.W_UnitWidget_C'
If a widget Blueprint is referenced in code, an error is displayed when the packaged game is launched stating that the widget could not be found (in 4.11 the widget still appears to be successfully found even after the error message is shown).
In the attached project, a code actor class locates a widget Blueprint by reference, then outputs a message to the screen if successful. The package settings for the project are set to perform a full build when packaging.
RESULT:
An error message is shown indicating that the W_UnitWidget widget could not be found (see the attached Error.png).
EXPECTED:
The game launches without any errors.
Head over to the existing Questions & Answers thread and let us know what's up.
0 |
Component | UE - Editor - UI Systems |
---|---|
Affects Versions | 4.9.1, 4.11 |
Created | Sep 24, 2015 |
---|---|
Resolved | Sep 29, 2015 |
Updated | Jul 14, 2021 |