Bank copy errors when using 2.0 integration

I just cleared out the old integration from my Unity project and put in the new one. I am getting this error:

IOException: Win32 IO returned ERROR_INVALID_NAME. Path: C:\Unity Projects\MyGame\Assets\StreamingAssetsC:
System.IO.Directory.CreateDirectoriesInternal (System.String path) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/Directory.cs:131)
System.IO.Directory.CreateDirectory (System.String path) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/Directory.cs:96)
System.IO.DirectoryInfo.Create () (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/DirectoryInfo.cs:141)
(wrapper remoting-invoke-with-check) System.IO.DirectoryInfo:Create ()
System.IO.Directory.CreateDirectoriesInternal (System.String path) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/Directory.cs:116)
System.IO.Directory.CreateDirectory (System.String path) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/Directory.cs:96)
System.IO.DirectoryInfo.Create () (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/DirectoryInfo.cs:141)
(wrapper remoting-invoke-with-check) System.IO.DirectoryInfo:Create ()
System.IO.Directory.CreateDirectoriesInternal (System.String path) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/Directory.cs:116)
System.IO.Directory.CreateDirectory (System.String path) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/Directory.cs:96)
System.IO.DirectoryInfo.Create () (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/DirectoryInfo.cs:141)
(wrapper remoting-invoke-with-check) System.IO.DirectoryInfo:Create ()
FMODUnity.EventManager.CopyToStreamingAssets () (at Assets/Plugins/FMOD/src/Editor/EventManager.cs:538)
UnityEngine.Debug:LogException(Exception)
FMODUnity.EventManager:CopyToStreamingAssets() (at Assets/Plugins/FMOD/src/Editor/EventManager.cs:556)
FMODUnity.EventManager:OnCacheChange() (at Assets/Plugins/FMOD/src/Editor/EventManager.cs:597)
FMODUnity.EventManager:Update() (at Assets/Plugins/FMOD/src/Editor/EventManager.cs:609)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()
1 Like

Thanks for reporting this. We have found and fixed the problem for the next release.

In the meantime you can find the fix on our Github:

@cameron-fmod Great thanks! I noticed the Issues tab on that Github repo is missing. Is what I did the best way to report bugs?

I did not realize that Issues had been disabled on the repo, I have just re-enabled it now.

Either here or on Github, whatever works best at the time.

@cameron-fmod

Hello, we are experiencing the same errors with version 2.0 Unity integration.

We are choosing the Mulitple Platform Build option and if the pathing is set to relative these error occur but if set to absolute path, the errors seems to go away. Although this would not be desired since we are using version control (Plastic SCM)

We have tried to modified the EventManager.cs like suggested but it didn’t seem to help.

These are the errors we got from the console.

FMOD Studio: copy banks for platform Windows : copying banks from FMODAssets\Desktop to C:/Users/Metanaut/wkspaces/ruberg/Assets/StreamingAssets
UnityEngine.Debug:LogError(Object)
FMODUnity.EventManager:CopyToStreamingAssets() (at Assets/Plugins/FMOD/src/Editor/EventManager.cs:555)
FMODUnity.EventManager:OnCacheChange() (at Assets/Plugins/FMOD/src/Editor/EventManager.cs:597)
FMODUnity.EventManager:Update() (at Assets/Plugins/FMOD/src/Editor/EventManager.cs:609)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()

and

IOException: Win32 IO returned ERROR_INVALID_NAME. Path: C:\Users\Metanaut\wkspaces\ruberg\Assets\StreamingAssetsC:
System.IO.Directory.CreateDirectoriesInternal (System.String path) (at :0)
System.IO.Directory.CreateDirectory (System.String path) (at :0)
System.IO.DirectoryInfo.Create () (at :0)
(wrapper remoting-invoke-with-check) System.IO.DirectoryInfo.Create()
System.IO.Directory.CreateDirectoriesInternal (System.String path) (at :0)
System.IO.Directory.CreateDirectory (System.String path) (at :0)
System.IO.DirectoryInfo.Create () (at :0)
(wrapper remoting-invoke-with-check) System.IO.DirectoryInfo.Create()
System.IO.Directory.CreateDirectoriesInternal (System.String path) (at :0)
System.IO.Directory.CreateDirectory (System.String path) (at :0)
System.IO.DirectoryInfo.Create () (at :0)
(wrapper remoting-invoke-with-check) System.IO.DirectoryInfo.Create()
System.IO.Directory.CreateDirectoriesInternal (System.String path) (at :0)
System.IO.Directory.CreateDirectory (System.String path) (at :0)
System.IO.DirectoryInfo.Create () (at :0)
(wrapper remoting-invoke-with-check) System.IO.DirectoryInfo.Create()
System.IO.Directory.CreateDirectoriesInternal (System.String path) (at :0)
System.IO.Directory.CreateDirectory (System.String path) (at :0)
System.IO.DirectoryInfo.Create () (at :0)
(wrapper remoting-invoke-with-check) System.IO.DirectoryInfo.Create()
FMODUnity.EventManager.CopyToStreamingAssets () (at Assets/Plugins/FMOD/src/Editor/EventManager.cs:538)
UnityEngine.Debug:LogException(Exception)
FMODUnity.EventManager:CopyToStreamingAssets() (at Assets/Plugins/FMOD/src/Editor/EventManager.cs:556)
FMODUnity.EventManager:OnCacheChange() (at Assets/Plugins/FMOD/src/Editor/EventManager.cs:597)
FMODUnity.EventManager:Update() (at Assets/Plugins/FMOD/src/Editor/EventManager.cs:609)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()

My group has also come across this issue and even after implementing the proposed change, we were still getting the following error:

I stepped through the code and found that the pathway being generated for both the source and target was putting in a second full path instead of just the sub directory or file name. below are pictures on where I found the issue to stem from and how I fixed it.

This change was done in the same EventManager editor file that had the initial proposed change. Hope this helps

1 Like

Running latest download of FMOD Studio 2.0 and Unity integration, and getting this exact issue when trying to use local paths to the studio project.
The posted GitHub fix appears to be in this release and not resolving the issue.

@angelrobinson13 can you explain what’s going on in your fix? (I currently don’t see any subDir reference in EventManager)

I’m also guessing FMOD should not be making a bank with the name of the full path to Master

Adding a Debug.Log to the refresh function does show the sourcePath & targetPath returning very ugly paths

You could try deleting the FMODStudioCache file, this will clear out any old information that may be stored and regenerate a new file.

Unfortunately doing that didn’t change anything. It seems like whatever is refreshing the banks and generating this data is doinking up at some point.

What versions of the FMOD integration and Unity are you using?

Occurs in both Unity versions I’ve used so far 2018.3.10f1 & 2018.3.6f1
FMOD integration is very latest posted, 2.00.02
FMOD Studio 2.00.01

It’s also 100% confirmed this is tied to trying to do relative paths to the studio project. If we use absolute, there’s no problem (unfortunately this make our version control not too happy)

Thanks for the information, we are looking into it.

I’m also having the same problem. I don’t know if it’s relevant but I built the banks locally before changing the build path in the same project to a relative path and then rebuilding again.

FMOD%20error%20invalid%20name

Hopefully this helps out a bit. I push the build the banks on the D: drive on my home computer, publish the updates. These screenshots are from my work computer. As of now, no audio gets through for anyone else on the team. I can see there is an additional D: at the end of the target path… Don’t know how to fix that.

What version of the FMOD Unity Integration are you using?

FMOD 2.00.03
Integration 2.00.03
Unity 2019.2.1f1

It is possible that the bad paths have been serialized to the FMODStudioCache.asset, you can manually delete this and the integration will generate a new one with correct paths. Also make sure that cache isn’t checked into source control.