compiler errors when building for android

This is the first time I have built this project for my phone, and im getting the following errors during the first stage of the build.

39705-capture.png

Everything is set up correctly to produce the app for android and I can test the game in unity without any problems

The 4th and 5th errors look relatively explicit and easy to solve (though it’s hard to be certain as we can’t see the full text).

  • You’re calling GUI.xxx from somewhere other than in OnGUI()
  • There’s an error on line 4 of masterServerNetwork.cs

As you said in a comment that the error is on UnityEditor import and the code runs fine on unity but the problem is with the platform other than unity editor so my guess is that you need platform dependent compilation. Since AFAIK unity editor is not available for builds.

I have also faced UnityEditor issue (not exactly similar to this one) when tried to use a unity alert for Android and iOS devices.

Hopefully, after defining an equivalent functionality for your devices, to not use, UnityEditor namespace will fix the issue.