using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.Networking; using Networking.Server; using Networking; public class NetworkedClient : MonoBehaviour { public ServerObject server; public BlockReader reader; // Start is called before the first frame update void Start() { Debug.Log("Registering: " + LogicProtocols.SendLogicList); server.server.RegisterHandler(LogicProtocols.SendLogicList, RecieveLogicList); } public void RecieveLogicList(NetworkMessage msg) { LogicProtocols.LogicMsg logicMsg; if (!msg.TryRead(out logicMsg)) { Debug.Log("Recieved unknown message"); return; } reader.LogicChain = new List(logicMsg.elements); } }