Path error while building for Mac OS

Hello, guys,

We are finishing a few games here, and they will be distributed for PC and Mac.

Everything runs fine when building the standalone for PC.
The real problem occurs when we try to build a Mac standalone, be it Intel-only or Universal.
Unity returns the following error at the end of the build:

Error building Player: DirectoryNotFoundException: Could not find a part of the path.
UnityEditor.HostView:OnGUI()

That occurs with more than one project.
I have tried reimporting all the assets, changing the destination of the build, changing resolutions…
The weird thing is that the project was compiled for Mac yesterday, for testing purposes.

Has anybody got through this?

Any feedback is appreciated.
Thank you!

Well, I found the root of the problem…

There is something in the Library folder that is making Unity generate an error while building for Mac OS.

I will post the file as soon as I find it.

Please, for any of the support/development team from Unity, I think this is important.

The problem I’ve described above is pretty much simple to solve, although the condition for it
to happen isn’t mentioned anywhere else, neither on the docs, nor the forum.

In the Player Settings, there are two fields: Company name, and Product name.

The bug occurs when you use any special character in the Product name (haven’t tested with Company name, though).
If you write it simple and plain, it builds just fine.

Thank you.

We got the same problem here. We have a “:” in the product name and we cannot make a Mac build on a PC. However it works on a Mac.

Patch for you in the meantime:
Create a build without the special characters in the product name and then edit the xml “Exec.app/Contents/info.plist” to put back the appropriate characters.

CFBundleExecutable
XXXX: YYYY

and

CFBundleIdentifier
unity.COMPANYNAME.XXXX: YYYY

Confirmed, this problem happened to me too when I attempted to put a colon in the name. Working now.

Thanks so much for the follow-up, you just saved me potential hours of pain.

Edit: Using Unity 3.5.6f4

This worked too for me. Repetitive Directory errors when building for Windows 8 Store until I removed a “!” from the Product name and it built fine. Thanks so much for putting me out of my misery.

I have successfully solve this issue by changing name of game.