Have a bit of problems to understand how i should have the property theNumber add and sync.
1) I have two players
2) When the players spawn i want theNumber to add one so each player report a different sequential number
I just do not get it to work and would appreciate some help.
Synchronize SyncVar property
1) I have two players
2) When the players spawn i want theNumber to add one so each player report a different sequential number
I just do not get it to work and would appreciate some help.
Code (CSharp):
- using UnityEngine;
- using System.Collections;
- using UnityEngine.Networking;
- public class Player : NetworkBehaviour {
- [SyncVar] public int theNumber;
- private int _nr;
- public override...