Networked worldspace UI

I have a worldspace UI that’s 100% working and it looks like this:


The idea is all players can use it, and its state is synced across clients. How do I network this thing? Mouse rollovers, clicks, etc. Our players are client-auth. Can you do this as server auth? Is that easier?

What EXACTLY do you want the players to see? I see it’s some sort of job board. Do you just want the job postings to “disappear” once one player accepts the job?

Ah, nah the jobs should stay there. Multiple players can select them. It’s ok to not network the mouse highlights for other players, but the player who is mousing over jobs should see the mouse highlights. Button click visuals would be nice to network. All players should see the description page change. I’m kinda new to UI, and kinda new to UNet, so the combination is confusing me :).

I think I understand what you’re asking, but you’re really asking for trouble. This sort of thing is usually kept local because you’ll potentially have many players trying to be “in control” of the UI.

Haha, yeah. That actually shouldn’t be a problem for us. However, if networking this is going to be a 2-wk process, it’s probably alright that they are local. If not though, it’ll match up with the rest of how the game works far better.

Well the simplest way would be to just use SyncVars in a script attached to the UI. For example a SyncVar bool that controls whether or not a button changes colors. You could SyncVar string that appears on the description page. Etc… Etc…

Sure, makes sense. The thing that’s the most confusing to me is how raycasting works with a networked player. The screen would have to be server-auth, and the player is client-auth, so how would I get the clicks and such to activate on the screen? Are the onclick/onmouseover/etc events still fired even if the UI button is server-auth? Then I just check isLocalPlayer inside the event to either pass to server or execute on server?