3d widget interaction not working in multiplayer

I’m trying to implement a UI using 3d widgets. Everything works perfectly in singleplayer, but when I switch to running as a listen server it all falls apart. On singleplayer, hovering changes the color of the widget, and click events are registered and communicated as expected.

When running as a listen server with 1 connected client, hovering the widget causes it to flicker between “hovered” and “unhovered”. On the server process when I mouse over the widget, the prints go something like this:
“server: hover detected”
“server: unhover detected”

On the client process the prints go something like this when I mouse over the widget:
“client 1: hover detected”
“client 0: unhover detected”

Why are there 2 client connections listed when there should only be 1 client?
Why does even the server rapidly hover/unhover the widget?
Why is this problem unique to multiplayer?

Any help or relevant insight would be appreciated.

1 Like

Update: It’s a play in editor problem. In advanced settings for play in editor, setting it to run each client in a separate thread solved the problem.

Why the heck is this the case, and what on earth was wrong with running in one process?

2 Likes

YOU ARE THE ONLY PERSON ON THE EARTH WHO SAVED MY LIFE!

THANKS THIS WAS A HUGE PROBLEM SOLVER

I can’t find this setting, can you show where it is by any chance? Or if maybe it’s renamed :confused:

Ahh actually I think that’s it! Thanks!

The solution that worked for me was setting a unique Virtual User Index on the owning client. Each player must have a unique Virtual User Index, which can be safely derived from the PlayerState PlayerId, and this setup must run on the client, not the server. Also, deactivate the Widget Interaction component by default and activate it at runtime after assigning the Virtual User Index. Once this was done, hover and click started working reliably for all players, and button states could be handled purely through styles set in the Widget Designer.