ESP8266 x Unity Game - Curl Error

No, that's only part of it. Please post all of it. Remember to "XXX" out any security credentials. Thanks for using code tags, by the way.

  buttonStatus = digitalRead(buttonPin);
  if (buttonStatus && !buttonLastStatus) buttonState = 1;
  else if (!buttonStatus && buttonLastStatus) buttonState = 0;
  buttonLastStatus = buttonStatus;

This seems rather confused and over complicated. It seems to me that it is equivalent to

  buttonState = digitalRead(buttonPin);

Can you please describe what you are trying to achieve?