Quantcast
Channel: Multiplayer
Viewing all articles
Browse latest Browse all 16796

SyncVar with client authority

$
0
0
I'd like to use SyncVar attribute along with Local Player Authority to keep code simple and easily extendible. I'd like just to add
Code (CSharp):
  1. [SyncVar]
  2. bool jump;
in my PlayerController class to allow player to send this command to server and therefore replicate it to other clients without writing yet another CMD method. But it seems it doesn't work like that. NetworkTransform with local player authority acts properly but SyncVar variables do not. Am I right?

Viewing all articles
Browse latest Browse all 16796