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

SyncVar Not Working

$
0
0
Trying to figure out why my variables aren't syncing from the server to the client. I've watched them change on the server...but they're not changing on the client.

Code (CSharp):
  1. usingUnityEngine;
  2. usingUnityEngine.Networking;
  3. usingSystem.Collections;
  4.  
  5. public class Input : NetworkBehaviour
  6. {
  7.     private bool cameraOn;
  8.     private Player player;
  9.  
  10.     void Awake()
  11.     {
  12.        player = GetComponent<Player>();
  13.     }
  14.  
  15.     void Update()
  16.     {
  17.         if(!isLocalPlayer)
  18.             return;...
SyncVar Not Working

Viewing all articles
Browse latest Browse all 16796

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>