Audiokinetic's Community Q&A is the forum where users can ask and answer questions within the Wwise and Strata communities. If you would like to get an answer from Audiokinetic's Technical support team, make sure you use the Support Tickets page.

IOException: Sharing violation on path ...

+3 votes

Hello,

When I'm Built in Unity I have this Error :

IOException: Sharing violation on path D:\Projets Unity\Blablabla\Assets\StreamingAssets\Audio\GeneratedSoundBanks\Windows\DecodedBanks.meta" or "D:\Projets Unity\Blablabla\Assets\StreamingAssets\Audio\GeneratedSoundBanks\Windows\DecodedBanks.meta

I searched but I can not find a useful answer to this problem.
So, it's impossible to built.

Any ideas ?

Thank you,

Theophile Demarcq

asked Mar 26, 2019 in General Discussion by Théophile Demarcq (1,550 points)

2 Answers

0 votes
 
Best answer

I also have the same issue, using Wwise 2019.1.4 - Unity 2019.2.9f1

I think it's related to the fact that both, source and destination paths for banks generation are the same (StreamingAssets/Audio/[PlatformName])

I made a quick fix to solve this issue, within the AKBuildPostProcessor.cs file, but it's not ideal.

Check this PasteBin: https://pastebin.com/DKzeb5x6

answered Oct 18, 2019 by Raúl Emmanuel I. (820 points)
selected Mar 19, 2020 by Théophile Demarcq
0 votes

Ok, we had the same problem today, and the other answer here isn't really the solution...

This exception happens because the SoundBanks path(s) inside Wwise is set to the StreamingAssets folder inside Unity, which is where they get copied on build.

So I discovered two things which are not very clear from the docs:

  • SoundBanks path(s) inside Wwise can be outside the Unity project (even better because this way the Unity Editor doesn't have to track unnecessary files), and all the sounds still work in the Editor.
  • SoundBanks path(s) inside Wwise should be outside of Unity's StreamingAssets folder if you have checked the option in Unity Project Settings > Wwise Editor > Asset Management > Copy SoundBanks at pre-Build step, because this way Wwise copies the SBs from the generation folder to the StreamingAssets, and it only copies the necessary platform, which is being built, so in this case the two folders are the same so the exception is thrown.
answered Nov 5, 2022 by Xriuk (230 points)
...