I’m trying to get the server and all clients of my game to have the exact same editable widget on screen. Here’s the basic idea I have so far:
The actor “Test”
The “RowTest” widget is just a text box. No code within.
This code works; but it doesn’t replicate to other players. I can’t figure out how to make it do so. I’m not fluent in C++ but I’m up for doing this in the language if it’s the easiest way to achieve these results. Thank you for your time!
UI is not repliced because UI exist only in client… because there no need for that, What UI does (should?) it only displays state of gameplay data, that data is only thing that needs to be replicated and UI that display that state will change accordingly without need of replication there. So you should keep data sepretly from UI and replicate only gameplay data, if you make UI display it and edit it, it will just work.
In Slate/UMG you can directly bind widget content to varable somewhere else which can be replicable, so make textbox edit varable that you replicate.
I do have the list of widgets in the scroll box of ScrollTest in a replicated widget array in my Test actor. I also have a List Refresh multicast custom event. This setup should accomplish the basic idea I’m going for, though shouldn’t it?
If it is entirely impossible to accomplish this in UMG, would it be possible in slate?
What if it’s a 3D widget… then there’s a reason for it to be replicated. I tried replicating the parameter of a health progress bar but it won’t show on the clients for some reason.
Hey, did you find a solution to your problem ? I’m also trying to do a simple widget where if i move a slider in either the client or server, the other instance also changes ?
No, I never did end up figuring it out. I just ended up moving on to a different project.
However, (having not used UE4 for a while now) I think I should have kept “stat” client-side, and pushed a call to all clients that adds a new item to it rather than sending the whole array and re-drawing.
Sorry I can’t be of more help.