It’s with great joy I’ve started using SVN with Unity, but after creating a StreamingAssets folder in my project, I consistently get a build error:
Error building Player: UnauthorizedAccessException: Access to the path “/Users/johan/Documents/Projects/Builds/MyProject Build/Data/Raw/.svn/all-wcprops” is denied.
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()
Shouldn’t Unity be ignoring SVN metadata when building?
There doesn’t appear to be an entry in the bug database for this particular problem. Please can you file a bug report for it (menu: Help > Report A Problem).
I had this same problem recently, and it was because I tried to use a Streaming Asset for playing an Intro Movie, but I didn’t own iPhone Pro. As soon as I removed the StreamingAssets folder, things went back to working normally.
This seems to be a pretty simple case of Unity not ignoring external version control metadata when copying the StreamingAssets directory over to the Data/Raw directory in the project build.
As a workaround, you could probably set up svn to completely ignore the StreamingAssets directory, and then the .svn metadata folder won’t even show up there. You’d have to manage that dir outside of source control, but it should fix the build problem.
From the project base dir, you would do something like svn pe svn:ignore Assets/, which would open an editor, and you’d add the line StreamingAssets in there. If it’s already in svn, you would have to remove it from the repository first (after backing it up, as course).