void Update() { if (processData) { lock (lockObject) { processData = false; UDPEventHandler.UDPDataReceiver(receiveData); } } }