When I create a new blueprint, based on the Actor
class, the Construction Script
does not seem to be able to get the text size from a TextRenderer
component. This issue, however, only occurs for deployment builds. It seems irrelevant what kind of packaged build I make, deployment or shipping, it just gives the same result. When launching from the editor, on the other hand, it always seems to work also if I decide to launch it as “Standalone Game”.
To exclude any influences from my Game/C++ I created a new “Blank” blueprint project. Here I created a new blueprint ActorBlueprint
, to which I added two TextRenderer
components above each others. I also added a Text
variable that allows me to set the text of the lower one TextRenderer1
. After setting the text I Get Text Local Size
and convert that to a string. This string is then assigned to the text of the other component TextRenderer
.
I place two of these ActorBlueprint
components above each other in my scene. From one I change the text to SomeLongText
to see this really works. In the editor I see the text get updated immediately and also when I run this from the editor I see the same/expected result.
36889-
Finally, I go to File > Package Project > Windows > Windows (64-bit) and package the game. (I also tried the 32-bit Shipping version.) When I run the packaged game the Y
size is always 0.000
instead of the text width.
I also tried updating SetYScale
in the Construction Script
. The text does then indeed get higher, but the value for Z
still displays 26.000
in packaged builds. In editor launched games it does correctly display the correct, higher, value for Z
. Weird thing is that also changing the YScale
property in the Details panel doesn’t seem to change the value returned by Get Text Local Size
. And for what it’s worth; Get Text World Size
has the same issue.
Before packaging I do a “Save All” and I clean the output directory. I also have “Full Rebuild” checked in my packaging settings. Since texts are assigned in the Construction Script
I know the blueprint is executed, at least to some extent. I’m using Unreal Editor version 4.7.3-2479750+++depot+UE4-Releases+4.7
.
I hope this info is useful for making Unreal Engine even better!