I scripted this script in c#:
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
using UnityEngine.Networking;
public class GetText : NetworkBehaviour {
[SyncVar]
public string Live;
[SerializeField]
Text abc;
void Start () {
}
void Update () {
abc = GetComponent <Text> ();
abc.text = Live;
}
}
I attached this script to a text object in the scene.
But the string variable doesnt sync.
Can someone help me.
Thanks in advance.