|
I'm trying to put together an automated build process for our project and I'm running into a total show-stopper. When I attempt to build, the process started by the BuildPlayer method exits with the following error message... Error building Player: FileNotFoundException: Could not find file "/Users/jeff/Public/CruiseControl/projects/****/Temp/StagingArea/iPhone-Trampoline/Unity-iPhone.xcodeproj/jeff.pbxuser". I executed the command line build function from inside the unity editor so that it wouldn't delete the Temp folder after throwing the error and dug into it to try and figure out why I was getting the above error. Inside the xcode project "file" (directory so far as my terminal cares) I found the file "user.pbxuser". So...unity is mis-naming the pbxuser file for some reason. Does anyone know why Unity is doing this? We're still using Unity 3.4 if that makes a difference. This is all done on a Mac running Snow Leopard.
(comments are locked)
|
|
I changed BuildOptions.AcceptExternalModificationsToPlayer to BuildOptions.None and no more error. I don't know why. Figured out why. BuildOptions.AcceptExternalModificationToPlayer requires a previously built project to be present. It's effectively the same as BuildOptions.None, except it will preserve any changes you made to the xcode project since the last time the build was run. However, if you pass BuildPlayer AcceptExternalModificationToPlayer when there is no previous project build present at the path you supply, it will incorrectly default the username to User when creating the initial .pbxuser file. Therefore, you need to set your BuildOption to None for the first build. After that you can use AcceptExternalModificationToPlayer and it won't error.
Apr 10 '12 at 10:42 PM
jyurkiw
Completely insane stuff. Thanks for sharing all your findings! I was having this issue even without using
May 15 '12 at 09:20 PM
Cawas
(comments are locked)
|
|
I've seen the same problem a few times. Possible solutions: I found those pages off of google and tried everything. Temp is being deleted like it should so that's not it. I tried exporting the entire project and that didn't do anything but eat more disk space. I even tried reimporting everything in-editor as well as restarting the entire computer just to make sure I restarted Unity. Nothing. The project is currently trying to build based off of my original SVN checkout location instead of the copy I made to work with CruiseControl. If that works I'll post about it here, but with over 8 gigs of project data I won't know until tomorrow.
Apr 07 '12 at 02:21 AM
jyurkiw
The only thing you've missed here, jyurkiw, is updating the wiki with your solution. It's ok, I've done it for you. ;-)
May 15 '12 at 09:22 PM
Cawas
(comments are locked)
|
|
If you start Unity in a terminal like this: USER=user open /Applications/Unity/Unity.app the file generated will be: user.pbxuser (it overrides your Unix user name) if everyone who works on the project does this you can append your iOS build because everyone has the same naming of the pbxuser file.
(comments are locked)
|

I tried creating a new project just to test our build process after a number of new errors cropped up that consists of nothing more than an empty scene and a basic command line build script. It still gives me this error.
I've checked the project settings and I can't find anything that would change the name of the offending pbxuser file from user to something else.
Is this a Unity bug? Are we just hosed (we can't upgrade to 3.5 this late in development. It's just not an option).
This is the code that fails.
string err = null; try { err = BuildPipeline.BuildPlayer(GetMobileScenes(), GetIOSBuildPath(), BuildTarget.iPhone, BuildOptions.AcceptExternalModificationsToPlayer); } catch (System.Exception ex) { Log("We encountered an error:\n" + ex.ToString()); } if (err != null) WriteErrorMessage(err);Get Mobile Scenes() retrieves a list of scenes from a file and returns a string array. Get IOSBuild Path does the same thing. Log is a function I wrote to replace Debug.Log because this method is ment to be called from the command line and Debug.Log is worthless without the editor running.
When I build from the Editor, the xcode project has a file named jeff.pbxuser.
What am I not setting in code that tells unity to name the pbxuser file after me instead of what has to be the default user.pbxuser? I've been combing through the documentation for everything I can find related to the build pipeline and I can't find anything relevant.