# Perforce Integration and StreamingAssets

**URL:** <https://qa.fmod.com/t/perforce-integration-and-streamingassets/12889>\
**Category:** Unity\
**Created:** [December 21, 2016, 11:36am UTC](https://qa.fmod.com/t/perforce-integration-and-streamingassets/12889 "2016-12-21T11:36:03Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![tomo\_cjt](https://avatars.discourse-cdn.com/v4/letter/t/e79b87/32.png) [@tomo\_cjt](https://qa.fmod.com/u/tomo_cjt)\
**Post date:** [December 21, 2016, 11:36am UTC](https://qa.fmod.com/t/perforce-integration-and-streamingassets/12889/1 "2016-12-21T11:36:03Z")

</div>

Hi,

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 Bank.strings.bank” 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.

Cheers,  
Chris

---

<div class="post-metadata">

**Author:** ![thuan](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/thuan/32/261_2.png) [@thuan](https://qa.fmod.com/u/thuan)\
**Post date:** [December 22, 2016, 11:45pm UTC](https://qa.fmod.com/t/perforce-integration-and-streamingassets/12889/2 "2016-12-22T23:45:42Z")

</div>

> [@](#):
>
> Hi,
> 
> 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 Bank.strings.bank” 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.
> 
> Cheers,  
> Chris

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?

---

<div class="post-metadata">

**Author:** ![tomo\_cjt](https://avatars.discourse-cdn.com/v4/letter/t/e79b87/32.png) [@tomo\_cjt](https://qa.fmod.com/u/tomo_cjt)\
**Post date:** [January 3, 2017, 9:52am UTC](https://qa.fmod.com/t/perforce-integration-and-streamingassets/12889/3 "2017-01-03T09:52:07Z")

</div>

Hi,

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.

Thanks,  
Chris

---

<div class="post-metadata">

**Author:** ![tomo\_cjt](https://avatars.discourse-cdn.com/v4/letter/t/e79b87/32.png) [@tomo\_cjt](https://qa.fmod.com/u/tomo_cjt)\
**Post date:** [January 4, 2017, 11:35am UTC](https://qa.fmod.com/t/perforce-integration-and-streamingassets/12889/4 "2017-01-04T11:35:41Z")

</div>

Okay,

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

[[Album] Imgur ![](https://i.imgur.com/PCzBcwJ.jpg?fb "Imgur") ](https://imgur.com/a/K1sic)

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?

Thanks,  
Chris

---

<div class="post-metadata">

**Author:** ![tomo\_cjt](https://avatars.discourse-cdn.com/v4/letter/t/e79b87/32.png) [@tomo\_cjt](https://qa.fmod.com/u/tomo_cjt)\
**Post date:** [January 4, 2017, 12:04pm UTC](https://qa.fmod.com/t/perforce-integration-and-streamingassets/12889/5 "2017-01-04T12:04:53Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![thuan](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/thuan/32/261_2.png) [@thuan](https://qa.fmod.com/u/thuan)\
**Post date:** [January 5, 2017, 3:26am UTC](https://qa.fmod.com/t/perforce-integration-and-streamingassets/12889/6 "2017-01-05T03:26:06Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![cameron-fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/cameron-fmod/32/261_2.png) [@cameron-fmod](https://qa.fmod.com/u/cameron-fmod)\
**Post date:** [January 18, 2017, 11:20pm UTC](https://qa.fmod.com/t/perforce-integration-and-streamingassets/12889/7 "2017-01-18T23:20:31Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jvd](https://avatars.discourse-cdn.com/v4/letter/j/7feea3/32.png) [@jvd](https://qa.fmod.com/u/jvd)\
**Post date:** [February 5, 2019, 6:45am UTC](https://qa.fmod.com/t/perforce-integration-and-streamingassets/12889/8 "2019-02-05T06:45:54Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![cameron-fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/cameron-fmod/32/261_2.png) [@cameron-fmod](https://qa.fmod.com/u/cameron-fmod)\
**Post date:** [February 11, 2019, 2:30am UTC](https://qa.fmod.com/t/perforce-integration-and-streamingassets/12889/9 "2019-02-11T02:30:55Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![cameron-fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/cameron-fmod/32/261_2.png) [@cameron-fmod](https://qa.fmod.com/u/cameron-fmod)\
**Post date:** [February 11, 2019, 2:31am UTC](https://qa.fmod.com/t/perforce-integration-and-streamingassets/12889/10 "2019-02-11T02:31:23Z")

</div>


