Perforce Integration and StreamingAssets


We use the built in P4 integration and it’s been working fine, but with FMOD I’m getting issues with the StreamingAssets.

I’ve set up the P4 Client by using an ignore file, but unfortunately whenever I sync to the latest audio changes the files in StreamingAssets are made Read Only.

This then causes errors on everyone’s machine when running the game:

FMOD Studio: copy banks for platform Windows : copying banks from FMOD\TerraTechFMOD\Build/Desktop to C:/Dev/terratech/main/Assets/StreamingAssets

which then causes:

UnauthorizedAccessException: Access to the path “C:/Dev/terratech/main/Assets/StreamingAssets/Master” is denied.

I really don’t want to put these files in SourceControl if I don’t need to, and have everyone to always have them checked- out.

Any help for getting this set up correctly would be great.


Hi Chris,

Just to clarify, are you using the Unity asset server and if the files in “FMOD\TerraTechFMOD\Build/Desktop” and “C:/Dev/terratech/main/Assets/StreamingAssets” in Perforce?


we do have the unity assets server (although it was disabled when I posted this), and the files in “FMOD\TerraTechFMOD\Build/Desktop” are in P4, but the files in “C:/Dev/terratech/main/Assets/StreamingAssets” are not in Perforce (the ignore file prevents them being checked in).

Speculation / Observation:
It seems that Unity makes these files read only when they’re created via EventManger.CopyToStreamingAssets and then on subsequent runs this falls over since the files are not writable.

We use the Perforce Mode in Unity’s Version Control Editor Settings.



so on further investigation it seems to be that it’s the FMOD project that is causing the issues:

In the image linked
A - where files are copied to.
B - where built Banks live.

The built banks (B) are under Source Control (same Depot as Unity Project) and we only want our remote audio designer or occasionally someone on site to have to build the banks - thus keeping the development environment the same for all staff.

However when these files are copied into the StreamingAssets folder (A) they maintain their ReadOnly flag, which then causes the errors I’m getting.

If I check out, or clear the ReadOnly flag -including the folder, B then it all seems to work.

However, this then means that when the sound is changed and re-built we’ll have issues for the rest of the team to deal with.

Any further help?


As a workaround I’ve checked in these banks as Writeable but I can’t see how this is feasible going forward, especially as it will require our sound designer or someone else to check in these files with the writable flag set.

Thanks for the additional information. It looks like a bug in the copying process in EventManager as you mentioned. We will look into fixing this by making the file writable prior to the copy.

This has been resolved and will be available in our next release, at the start of Feb.

This is happening to us as well now, two years later. Is there a more recent solution?

We are looking into this at the moment and should have this resolved for the next release.