Im just trying to build my game on a mac and Im just hitting problems

Hey there,

I making a little hobby game, and I want my friends to try it out on their computer, but they are using mac, and I am using windows.

I uploaded my project from my windows pc to the collab cloud, and I installed unity on a friend’s computer, so I could build for mac (not even touching upon how retarded it is that I have to use a mac to build for it). Upon downloading everything, and testing the game in the editor, I build for the mac platform. I get hit with 3 errors:


UnityEditor.BuildPlayerWindow+BuildMethodException: Error building Player because scripts have compile errors in the editor
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (BuildPlayerOptions options) [0x0020e] in /[Users/builduser/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:181](http://users/builduser/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:181) 
at UnityEditor.BuildPlayerWindow.CallBuildMethods (Boolean askForBuildLocation, BuildOptions defaultBuildOptions) [0x00065] in /[Users/builduser/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:88](http://users/builduser/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:88) 
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Build completed with a result of 'Failed'
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

I tried googling that first error, and apparently I have to place scripts with “using UnityEditor” inside a special folder. I have imported some assets from StandardAssets to use, and some of the scripts are not in this folder. I then locate all the relevant scripts and place them in an editor folder.

Now, get this: now I get a reference error, such as:

Assets/Standard Assets/Utility/WaypointProgressTracker.cs(43,16): error CS0246: The type or namespace name `WaypointCircuit' could not be found. Are you missing an assembly reference?

Im honestly stumped, please help, this was not supposed to take my entire day. :frowning:

~~Mekt

When using UnityEditor, the script must be in a folder called ‘Editor’. That’s the case for windows, too. Scripts inside that folder will only be compiled while running the editor, not in builds.

Mind you, you can build for Mac with windows. You may be required to add the Mac build support option for your copy of Unity, though. You can re-run the installer and just add that 1 part, without having to reinstall the rest.

I’m uncertain what the other problem is exactly. Perhaps you moved too many files to the editor folder, or not enough (or deleted a file by mistake).

I already tried putting them in a seperate folder, but then I get the error in the bottom, where some scripts cannot find the newly reallocated script! :confused:

And I guess the problem is not mac exclusive, because now I get the same error on my windows pc! I swear this was not a problem when I worked on it yesterday!