SyncVar hooks don't apply to players on the server (if server only mode)

Maybe it will just make sense in future lectures and/or when I think about how the changes flow, but I noticed the videos are always doing client + host execution and not server only.

There’s a difference in that if you do client + host, then the color and name etc. get updated visually on both the (hosting) server and the clients.

If you do server only though, the clients all get their data set via their sync vars, but the server doesn’t and just renders everything with its default position / color / name / etc.

I’m projecting a guess that it’s because you’d be expected to move / place / stylize items on the server first, and then push the data down through the sync vars for the clients to “play” the same changes.

For now though, it seems like a duplication of effort (to make it work, e.g. via Updates on the server side) or an inconsistency in results depending on whether you go server only or as a playable client in a host server.

Just an observation; not necessarily a question, but hope the way forward and reasons become clear soon.

Privacy & Terms