Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
5
Question by jyurkiw · Apr 06, 2012 at 06:46 PM · iosiphonebuild-errormac

BuildPipeline.BuildPlayer misnames .pbxuser file

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.

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image jyurkiw · Apr 10, 2012 at 05:17 PM 0
Share

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(Get$$anonymous$$obileScenes(), GetIOSBuildPath(), BuildTarget.iPhone, BuildOptions.AcceptExternal$$anonymous$$odificationsToPlayer); } catch (System.Exception ex) { Log("We encountered an error:\n" + ex.ToString()); }

     if (err != null) WriteError$$anonymous$$essage(err);

Get $$anonymous$$obile 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.

avatar image jyurkiw · Apr 10, 2012 at 05:59 PM 0
Share

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 ins$$anonymous$$d 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.

3 Replies

· Add your reply
  • Sort: 
avatar image
4
Best Answer

Answer by jyurkiw · Apr 10, 2012 at 08:35 PM

I changed BuildOptions.AcceptExternalModificationsToPlayer to BuildOptions.None and no more error.

I don't know why.

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image jyurkiw · Apr 10, 2012 at 10:42 PM 2
Share

Figured out why.

BuildOptions.AcceptExternal$$anonymous$$odificationToPlayer 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 AcceptExternal$$anonymous$$odificationToPlayer 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 AcceptExternal$$anonymous$$odificationToPlayer and it won't error.

avatar image cregox · May 15, 2012 at 09:20 PM 0
Share

Completely insane stuff. Thanks for sharing all your findings! I was having this issue even without using BuildPipeline or any editor scripts whatsoever. :-o

avatar image
2

Answer by olivierva · May 24, 2013 at 09:41 AM

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.

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image cxvs · Sep 09, 2014 at 01:33 PM 0
Share

many thanks olivierva!

avatar image perplex_bcn · Nov 06, 2014 at 12:03 PM 0
Share

This worked for me, thank you very much olivierva! :)

avatar image
0

Answer by rutter · Apr 07, 2012 at 01:48 AM

I've seen the same problem a few times.

Possible solutions:

  • http://forum.unity3d.com/threads/57538-iphone-trampoline

  • http://unifycommunity.com/wiki/index.php?title=Unity_iPhone_Problems_and_Solutions

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image jyurkiw · Apr 07, 2012 at 02:21 AM 0
Share

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 ins$$anonymous$$d 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.

avatar image cregox · May 15, 2012 at 09:22 PM 0
Share

The only thing you've missed here, jyurkiw, is updating the wiki with your solution. It's ok, I've done it for you. ;-)

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

6 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Simultaneous Android and iOS development 1 Answer

iPhone Virtual Reality App won't load onto my phone. 0 Answers

Mini Mac - Can this Compile Unity? 2 Answers

xCode Errors 1 Answer

Can I build for iphone in a Windows PC? 3 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges