// Use this for initialization void Start() { Worker worker = new Worker(this); com = GetComponent <XBeeSerialServerCommunicator> (); com.dataReceived += (buf, from, len) => { for (int i = from; i < from + len; i++) { worker.Process(buf[i]); } }; }
// Use this for initialization void Start() { Worker worker = new Worker (this); com = GetComponent<XBeeSerialServerCommunicator> (); com.dataReceived += (buf, from, len) => { for(int i=from;i<from+len;i++){ worker.Process(buf[i]); } }; }