I am running an automated build system using Unity 3.0 Pro on a dedicated server (Mac Pro with 2 quad core Xeons, 16 GB RAM) which autobuilds standalone Windows and OS X Universal players my project every hour as a cron job. This has worked quite well for the past several months, but a few days ago I started getting an "out of memory" message when a normal build was being attempted. Memory use balloon up to ~3 GB and that's the point at which Unity normally crashes. Occasionally it will get to the point of building the players, once again memory use balloons up to ~3 GB, and at that point it will hang up and progress no further.
The code in script (omitting personal information like passwords and such) I am using to build my project is as follows:
/Applications/Unity30/Unity.app/Contents/MacOS/Unity -batchmode -quit -projectPath /path/to/my/project -executeMethod ProjectBuilder.PerformBuild -assetServerUpdate myAssetServer myProjectName myUsername myPassword
The relevant code in ProjectBuilder.PerformBuild is (once again changing some names so it make more sense) as follows:
BuildPipeline.BuildPlayer(sceneToIncludeInBuild, "WindowsBuild.exe", BuildTarget.StandaloneWindows, BuildOptions.Development); BuildPipeline.BuildPlayer(sceneToIncludeInBuild, "OSXBuild.app", BuildTarget.StandaloneOSXUniversal, BuildOptions.Development);
If anyone has run into a similar issue I would welcome some input.