- Home /
Error building OSX only.
I'm trying to make an editor script that will build several versions and then place them in corresponding folders, it works fine for the WIN/NIX builds but always fails for OSX, building on a Windows Machine(win 8).
[MenuItem("Build ALL")]
public static void Build_All()
{
string deployPath = ppUtility.pgBuildAllDeployPath;
PlayerSettings.productName = "pw";
string appPath = deployPath + "builds" + "/" + "/" + "dist" + "/" + "pw" + "/" + "win" + "/" + "32" + "/" + "pw32.exe";
BuildPipeline.BuildPlayer(new string[] { "Assets/pp/pw/main.unity" }, appPath, BuildTarget.StandaloneWindows, BuildOptions.None);
Debug.Log("pw (WIN32) build " + DateTime.Now.ToString("dd MMM HH:mm:ss"));
PlayerSettings.productName = "pw";
string appPath5 = deployPath + "builds" + "/" + "/" + "dist" + "/" + "pw" + "/" + "nix" + "/" + "32" + "/" + "pw.x86";
BuildPipeline.BuildPlayer(new string[] { "Assets/pp/pw/main.unity" }, appPath5, BuildTarget.StandaloneLinux, BuildOptions.None);
Debug.Log("pw (NIX32) build " + DateTime.Now.ToString("dd MMM HH:mm:ss"));
PlayerSettings.productName = "pw";
string appPath2 = deployPath + "builds" + "/" + "/" + "dist" + "/" + "pw" + "/" + "mac" + "/" + "32" + "/" + "pw32.app" + "/";
BuildPipeline.BuildPlayer(new string[] { "Assets/pp/pw/main.unity" }, appPath2, BuildTarget.StandaloneOSXIntel, BuildOptions.None);
Debug.Log("pw (MAC32) build " + DateTime.Now.ToString("dd MMM HH:mm:ss"));
deployPath just being a reference to "/../../" to go up several folders.
This will build the win and linux versions fine and put them in the appropriate folder. OSX will always result in.
Error building Player: IOException: Failed to Move File / Directory from 'Temp/StagingArea/UnityPlayer.app' to 'C:/unitypp/pw/Assets/../../pw/mac/32/pw.app'.
I tried tons of things, launching with admin, restarting unity, computer, putting extra /s or removing them, changing them to \, anything I could think of.
The issue, as I've discovered, is that ONLY when building the OSX version, Unity cannot create new folders automatically(which works fine with win/nix). If I create the target folder before building, it works fine.
Any ideas why this is this is an issue only with building the OSX version? and thoughts on ways to over-come it?
Have you found a solution to this problem? I have the exact same one and tried a lot of things... but it only happens with OSX build.
Your answer
Follow this Question
Related Questions
Distribute terrain in zones 3 Answers
Build Problem (Mac) 1 Answer
errors on IL2CPP build 0 Answers
Android Build problem? 2 Answers
Game not working after build 0 Answers