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