How to pre-fix the bank folder on UE4 due to restrictive names?

When you “Build” your sounds, it creates folders for platform, eg: “Desktop”

However the folder name “Desktop” is reserved in UE4 and is not allowed to be used when cooking content, eg:

UATHelper: Packaging (iOS): ERROR: The following files are set to be staged, but contain restricted folder names (“Desktop”):
UATHelper: Packaging (iOS): cookeddata/xx/content/fmod/desktop/master.bank
UATHelper: Packaging (iOS): cookeddata/xx/content/fmod/desktop/master.strings.bank
UATHelper: Packaging (iOS): cookeddata/xx/content/fmod/desktop/

Is there a way to prefix this so it doesn’t use this type of naming convention?

1 Like

So I changed the output directory inside Preferences > Build however this has broken everything, nothing builds now, it just simply doesn’t copy across.

Also this breaks Help > Validate as it seems that expects the folder “Desktop”

This is extremely buggy…

I can confirm 100% that if you rename “Sub Directory” it will refuse to build, it has to be EXPLICITLY be named “Desktop” which is a reserved name in Unreal Engine making it impossible to distribute using FMOD… This has been an extremely frustrating issue.

If you name it “xDesktop” for example it will not copy across events.

Is there lots of hard coded stuff in the plugin or something?

Thanks for raising this.

You can add the Desktop directory to a whitelist so that the Unreal build tool will copy it to staging. You need to add an entry to either DefaultGame.ini or IOSGame.ini (replace MyGame with your project’s name):

[Staging]
+WhitelistDirectories=MyGame/Content/FMOD/Desktop

By default the FMOD plugin will try to load the banks for iOS from a directory named Mobile, you can set the Force Platform Name setting to Desktop to override this.

Hi Derek,

Unfortunately this does not work. I have tried about 1000 different combinations of directories, but it still comes up with the same error regardless… I wonder if it’s a Big Sur problem, or a bug in UE4

Is there any chance of fixing the subdirectory issue?

Here are some examples:

[Staging]
+WhitelistDirectories=ProjectMiniProd/Content/FMOD/Desktop
+WhitelistDirectories=Content/FMOD/Desktop
+WhitelistDirectories=projectminiprod/content/fmod/desktop

I’ve tried one at a time, all together, in IOSGame.ini with that file whitelisted, it simply doesn’t work.

Project.StageConfigFiles: Excluding config file /Users/x/Desktop/ProjectMini/Project/ProjectMiniProd/Config/DefaultEditor.ini
Project.StageConfigFiles: Excluding config file /Users/x/Desktop/ProjectMini/Project/ProjectMiniProd/Config/DefaultEditorPerProjectUserSettings.ini
Log.WriteException: ==============================================================================
Log.WriteException: ERROR: The following files are set to be staged, but contain restricted folder names ("Desktop"):
Log.WriteException:        cookeddata/projectminiprod/content/fmod/desktop/master.bank
Log.WriteException:        cookeddata/projectminiprod/content/fmod/desktop/soundtrack.bank
Log.WriteException:        cookeddata/projectminiprod/content/fmod/desktop/soundtrack.strings.bank
Log.WriteException:        [Restrictions]
Log.WriteException:        Win32
Log.WriteException:        Win64
Log.WriteException:        HoloLens
Log.WriteException:        Mac
Log.WriteException:        XboxOne
Log.WriteException:        PS4
Log.WriteException:        Android
Log.WriteException:        HTML5
Log.WriteException:        Linux
Log.WriteException:        LinuxAArch64
Log.WriteException:        AllDesktop
Log.WriteException:        TVOS
Log.WriteException:        Switch
Log.WriteException:        Lumin
Log.WriteException:        Windows
Log.WriteException:        Microsoft
Log.WriteException:        Unix
Log.WriteException:        Sony
Log.WriteException:        XboxCommon
Log.WriteException:        Desktop
Log.WriteException:        EpicInternal
Log.WriteException:        CarefullyRedist
Log.WriteException:        NotForLicensees
Log.WriteException:        NoRedist
Log.WriteException:        If these files are intended to be distributed in packaged builds, move the source files out of a restricted folder, or remap them during     staging using the following syntax in DefaultGame.ini:
Log.WriteException:        [Staging]
Log.WriteException:        +RemapDirectories=(From="Foo/NoRedist", To="Foo")
Log.WriteException:        Alternatively, whitelist them using this syntax in DefaultGame.ini:
Log.WriteException:        [Staging]
Log.WriteException:        +WhitelistDirectories=MyGame/Content/Foo
Log.WriteException:        (see /Users/x/Library/Logs/Unreal Engine/LocalBuildLogs/Log.txt for full exception trace)

I have figured this out, the error message is wrong, it has to be in this format:

+WhitelistDirectories=cookeddata/<mygame>/content/fmod/desktop

It has to be lower case and it has to include “cookeddata”.

  • Could be a MacOS Big Sur / IOS specific

The subdirectory is still an issue (doesn’t import events if you rename it anything other than Desktop) but that’s a separate problem and at least this circumvents it for now.

Thanks for the follow up - I haven’t encountered the need to use “cookeddata” in the whitelist before, I’ll investigate further and add an issue for our documentation to be updated around this.

I’ll also add a feature request for allowing more control over the directory names the plugin uses for bank files. They are currently hard-coded; the plugin is open source on GitHub so it is possible to change them if you really want to, but it would certainly be nicer to have this stuff exposed through settings.

1 Like

As I was building from Win to Android,
The only thing that worked was this
I pasted this into DefaultGame.ini
And it finally worked

[Staging]
+AllowedDirectories=mygame/Content/FMOD/Desktop

Not sure if developers are still in this old thread, and excuse my incompetence if I am missing something.

But surely, there has got to be a better name to use than “Desktop”??? After all these years since this thread started, and this is still an issue today. I am just flabbergasted at this.

Given, of course, that I am a fairly new game developer and maybe this is easier than what I make it out to be, but I really think you guys could make this process a whole lot simpler. How can you even accept that a project with an FMOD integration just cannot be built by default? If my sound designers weren’t hell bent on using FMOD I would personally have opted out because of this nuisance.

I do not want to come of as overly negative, and should you want the perspective of a noob game developer I would love to help you create some user requirements for future development.

Thanks for the feedback. I’ll register your interest in our issue tracker.