- Home /
Unity 4.5 Mac OSX Won't Compile Scripts
Hi all, I am a Unity pro subscriber, I also have iOS and Android pro.
Whenever I start Unity (fresh install) on my brand new iMac (OSX 10.9.3) to work on an existing project, Unity hangs on "Compiling Scripts..." and has to be force quit.
Then when launching Unity with the alt key held I can start a new project. But whenever I create a script, c# or .js, the import spinner in the bottom right spins forever and I am unable to press play and test it. Then if I save and close Unity, then reopen, I am back to it hanging on "Compiling Scripts..." and it has to be force quit again.
I have uninstalled and reinstalled Unity several times, I have wiped every mention of Unity I can see off this Mac, cleared the PRAM and reinstalled and I still cannot get around this issue.
I was running Unity fine on my older Mac Mini before, I cannot understand what is causing this issue!
Here is a screenshot of the logs output:
![log][3]
Also - When I return my Unity licence and quit, if I reopen Unity my Pro licence is still intact as if I had never returned it.
I don't know if this is relevant, but if I open manage licences and click "Activate new licence" I get a "Moving file failed" error (see below). If I navigate to "/Library/Application Support/" on my Mac there is no "/Unity/" folder let alone a "Unity_v4.x.ulf" file - should there be??
Any help would be really greatly appreciated!
Thanks in advance.
EDIT - I have submitted a bug report. I wonder if this a new bug with v4.5?
EDIT 2 - Still getting this issue, Unity completely unusable on my Mac. Should I do a factory reset of my entire Mac??
EDIT 3 - Can anyone shed any light on this? I've exhausted all other methods and I can't see a support phone number for Unity anywhere - I am a paying customer!!
[3]: https://dl.dropboxusercontent.com/u/3615425/Screen%20Shot%202014-06-03%20at%2011.32.17am.png
What version of OSX are you running? Could be a compatibility problem.
The file is a plain text xml file. You could try putting an empty file there and see what happens?
I've not tried 4.5 myself yet, but I seem to remember seeing the compile problem before but don't remember how I solved it... I think a few people at work are using it on OSX without any problems though.
Well, the license error makes me think there is something odd with permissions on the new machine. Are you an ad$$anonymous$$ user?
@Tarlius - I'm running OS X 10.9.3 on a 27" 3.2 GHz Intel Core i5 i$$anonymous$$ac, it's a week old.
I tried putting an empty file there and that didn't work, thanks for the suggestion.
@Graham Dunnett - I am an ad$$anonymous$$ user yes. I just ran the permissions verify/repair in Disk Utilities and that hasn't worked either.
Answer by bbeckford · Jun 10, 2014 at 12:12 PM
Ok I fixed it
I wiped my Mac HDD and reinstalled Mac OS X and now it seems to be working properly.
I think the reason for it not working in the first place could be that I used the Mac Migration tool to move all my old data & software from my old Mac Mini to the new Mac, causing even reinstalls of Unity to brake.
I guess this was an unknown bug!
Answer by danien · Jun 03, 2014 at 02:28 PM
Unity sometimes has problems opening a project if the Library folder is out of date (doesn't match what it's expecting with the Assets folder).
We often see this in our projects after a major Unity update or if there are lots of files being removed/changed after updating from our version control (i.e., changes were made by one person on the team, committed into version control, and another person updates to get the changes).
Since we have meta files turned on, we can just delete the Library folder and let Unity recreate the folder. NOTE: If you don't have meta files turned on and you delete the Library folder, you may lose references to assets in your prefabs/assets (e.g., Missing Monobehaviour, etc).
Hi Damien, I tried that and it didn't work, thanks anyway.
The problem is that Unity won't compile a single script, even on a fresh blank project.
Answer by prophecy_x · Jun 25, 2015 at 12:55 PM
You can do workaround method by running it with root privileged.
cd /Applications/Unity/Unity.app/Contents/MacOS
sudo -b ./Unity
Reference: http://forum.unity3d.com/threads/stuck-compiling-scripts-on-launch-4-6-and-yosemite-mac-os-x.282786/
Note that, your problem is not fixed yet. You just change to use root environment, which is different from user environment (where is failed to compile the scripts)
Nice. That worked for me. Does this suggest that it's a permissions problem?
Answer by ffs_fouad · Sep 30, 2016 at 02:18 PM
Holy shit. I fixed the problem. It was related to permissions afterall.
So, I rechecked permissions on all folders in on my MacHD, ensured my account had read+write permissions, ensured that the changes were being applied to ALL enclosed items in the folder structure, and FINALLY unity is working again :D
Thanks to prophecy_x for the all-important clue.