Maybe there is a fancy math thing for this but why does unreal 4 umg display my float at 0.0 as 0 on screen when playing? and is there a way for a fix on this?
Hey there Lathost!
I have been playing with the UMG for a while now and to my understanding is since the 0.0 is the same as 0, it displays it naturally as 0. Is it displaying the decimal once the number is then increased to any amount while playing? Say maybe you have a damage amount to be set at 0.0 in the UMG blueprint, but once the damage of say .3 is taken, does the number while playing show 0.3? It may be showing 0 until the number is changed to be larger than that even if it is only by .1 at a time. Hopefully this helps in some way.
- Ryan
“0.0” will be displayed as 0. That makes sense if you think about it. It’s a float. It’s not 0.000 or 0.00000000000000000000000000000. If you want to display it as 0.0 you can implement something like this inside your UMG Graph:
In this graph if the float value is 0.0 it will convert the float into string, then name. It will force the display as “0.0” instead of “0”.