Download

UE4 UMG Slider acting strangely when testing with multiple players in PIE.

I’ve hit a weird issue when testing the UMG Slider in multiple PIE Clients. I’m running 4.26 but have also tested this in 4.25

  1. The slider seems to only work in the last spawned client (In the example to follow Client 2). If it was going to work in any instance I would have assumed listen server, but nope…always the last client to spawn.
  2. Other UI elements work fine in each client as expected since UI shouldn’t be replicated. See checkboxes in example below.
  3. It’s still getting the **value **from the sliders on all clients. So the **OnValueChanged **event is being fired, just the UI itself is having issues.
  4. If I move the slider on the working client (Client 2 below) then go back to another client and click on the slider the handle will snap to a new position but still not be moveable as if the working client slider is replicating and affecting both the server + other client slider.
  5. These are bare bones widgets, no functionality has been implemented on the graph.
  6. The widget is placed in an Actor as a Widget Component(3d widget) and the scale is set to the same as the widget so (1:1)

I had previously posted this on Answer hub when I thought it was related to replication, but I’m not sure it is anymore.

Thanks in advance!

I’ve just testing with a build and launching on instance as a listen server (using ue4 command line args) and 1 as a client. Hitting the same issues, works fine if I just if you just launch 1 client, but with multiple clients or 1 listen server and multiple client the slider stops work.

I guess I’ll just have to find a different solution. Even with all replication turned off on the actor holding the widget component the slider seems to somehow be affect across all clients. I’ll just write this one as a bug and move on.

If anyone’s interested in testing this:

  1. Create UGM widget with slider. No graph functionality
  2. Add Widget component to basic actor
  3. assign step 1 widget as widget class on widget component.
  4. add actor to scene.
  5. add widget interaction component to default pawn. Turn on debug if needed.
  6. Under the PIE menu, set Net Mode as Listen Server or Client
  7. set the number of players to 2+
  8. hit play and notice only the last spawned player can use the slider. The others will see the slider delta update on interaction but the handle will always snap back to its start position.
  9. Test with 1 player only and notice the slider works fine.
  10. build and launch multiple instances on their own processes on your machine and notice the same issue.
  11. add any other type of object (checkboxes, buttons ) to the step 1 widget and notice they work fine across all clients.
  12. cry

are you adding to viewport or player screen?

When all else fails, build your own…Uugghh.

I managed to get my solution part way from this answer:

https://answers.unrealengine.com/questions/506715/set-image-position-inside-widget-through-widget-in.html?sort=oldest