Wrong script locations going of and wrong directory

The audio in my game works great in the editor, but it won’t play in the build.
And when press build and run, it says “Build ‘failed’ in 0 seconds” and “IOException: The filename, directory name, or volume label is incorrect”, when I click on the error it says the location of my FMOD soundfile and some random folder in my unity project with nothing in it, and it says that the scripts that are giving the error are the FMOD plug-in scripts(EventManager,EditorUtils) but the location is in my unity project back-up in my one drive, I don’t know why the scripts in the back up version of my project are even running.

I tired refreshing the banks, redoing the set-up wizard, Using Update event References and moving the folders around, checking the file locations and the only thing I haven’t tried yet is reinstalling Fmod integration.

I don’t know how I could change the directory or stop the wrong script’s locations from going off.
I can provide additional information if needed

Hi,

Thank you for sharing the information.

Could I please get some more info? Specifically:

  • The version number of the Unity FMOD integration you are using
  • The exact error messages you’re seeing
  • In the FMOD settings (FMOD > Editor settings> Bank Import), could you confirm whether the Studio project path is set correctly?

I am using FMOD Studio 2.03.07.
In unity I’m using 2.03.06 in unity.


The banks are directed to the correct path in the FMOD settings.
The error is>

 IOException: The filename, directory name, or volume label syntax is incorrect : 'C:\Users\\>username<\Desktop\Folder Folder-Benji\Unity Projects\WIP Take 17\Assets\StreamingAssets\C:\Users\\>username<\Desktop\Folder Folder-Benji\Sound Concept\NestQuestSoundFile\Build\Desktop'
> System.IO.FileSystem.CreateDirectory (System.String fullPath) (at <8db6ec373e6d40bd9d38c8037d358c4e>:0)
> System.IO.Directory.CreateDirectory (System.String path) (at <8db6ec373e6d40bd9d38c8037d358c4e>:0)
> FMODUnity.EventManager.CopyToStreamingAssets (UnityEditor.BuildTarget buildTarget) (at Assets/Plugins/FMOD/src/Editor/EventManager.cs:768)
> FMODUnity.EventManager+<>c.<.cctor>b__15_0 () (at Assets/Plugins/FMOD/src/Editor/EventManager.cs:571)
> FMODUnity.BuildStatusWatcher.SetBuildInProgress (System.Boolean inProgress) (at Assets/Plugins/FMOD/src/Editor/EditorUtils.cs:1747)
> FMODUnity.BuildStatusWatcher+BuildProcessor.OnPreprocessBuild (UnityEditor.Build.Reporting.BuildReport report) (at Assets/Plugins/FMOD/src/Editor/EditorUtils.cs:1773)
> UnityEditor.Build.BuildPipelineInterfaces+<>c__DisplayClass16_0.<OnBuildPreProcess>b__1 (UnityEditor.Build.IPreprocessBuildWithReport bpp) (at <a4c13c6b048543258b1eafe39cc26dc5>:0)
> UnityEditor.Build.BuildPipelineInterfaces.InvokeCallbackInterfacesPair[T1,T2] (System.Collections.Generic.List`1[T] oneInterfaces, System.Action`1[T] invocationOne, System.Collections.Generic.List`1[T] twoInterfaces, System.Action`1[T] invocationTwo, System.Boolean exitOnFailure) (at <a4c13c6b048543258b1eafe39cc26dc5>:0)
> UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()

and>

Error building Player: IOException: The filename, directory name, or volume label syntax is incorrect : 'C:\Users\>username<\Desktop\Folder Folder-Benji\Unity Projects\WIP Take 17\Assets\StreamingAssets\C:\Users\\>username<\Desktop\Folder Folder-Benji\Sound Concept\NestQuestSoundFile\Build\Desktop'

The game builds fine if I built through the “Build Profiles” option, I might be a tad stupid.

Thank you for sharing the detailed information.

It looks like the issue is being caused by the FMOD Bank Sub Folder setting. Unity is trying to concatenate this path with the StreamingAssets folder, which results in an invalid path.

To resolve this, you can try one of the following:

  • Leave the Bank Sub Folder blank so FMOD will handle the path automatically.
  • Use a relative path instead of an absolute one, for example, use Build/Desktop rather than C:\Users\YourName\....

As long as the folder is inside your FMOD Studio project directory, FMOD will resolve the relative path correctly based on the Studio Project Path.

Hope this helps! Let me know if the issue persists.