How to - Optimize Floating Damage Text (Actor, not Widget)

Is the BP strictly displaying the widget or is it doing other things like attempting to face the players camera on tick?

I’ve heard that the widget components can be expensive so to use them sparingly so it’s possible you’re running into that. I guess I wouldn’t expect it to drop our FPS in half though, that’s intense. Since I haven’t dealt with this issue specifically the best I can offer is guidance on what I would try in order to narrow down the issue.

First try switching to the text render component. This is for giggles, just to see if it really is the widget component that is causing the slow down. If you can spawn thirty of these at a go and not notice the same slow down then it’s the widget component and there might not be a lot you can do to fix this. Or heck, spawn 30 of anything (spheres, cubes, etc.) other than the widget component.

Barring that I think you’re in the territory of running unreal insights and/or the profiler to see where the bottleneck is.

As for you widget pool, many ways to approach that. All of your suggestions are viable. You can create an actual pool (BP_DamagePool) that spawns a bunch up front and then you simply tell it where to display and what to display when the time comes. I would personally probably put it on each actor that can take damage, then whenever they receive damage simply show the widget with the damage value…seems like a cleaner approach.

EDIT: Another thought I had…widget components are expensive partly because they can accept input. Have you tried disabling tick on the widget component?

EDIT 2: It’s probably worth pointing out that if you’re going to use a pool of any sort (ie an actual pool or a widget component on each actor) whenever you’re not displaying the widget you’ll want to disable it completely by turning tick off…that will certainly save you some cycles.

EDIT 3: A little digging brought up the following on potentially improving widget performance in case you haven’t already seen them.
How to design an efficient Blueprint class and widget in VR — Wave VR 4.5.0 documentation (vive.com)
Widget Component slow performance - Programming & Scripting / UI - Unreal Engine Forums

1 Like