Unreal 4.16.1 debug game build error: ICU data directory was not discovered
Hi, I have updated to latest Unreal version 4.16.1 and now the debug of a game build does not work anymore. Tried it with a clean c++ starter project.
Can someone confirm this problem?
Steps to reproduce:
Ok, the workaround is to define UE_ENGINE_DIRECTORY in your pch header. In my case it looks like this:
The project folder and Epic Games folder are siblings.
This is still not working on my Mac Project with 4.17.2. I am not able to debug because FPaths::GameContentDir() and FPaths::EngineContentDir() are pointing to wrong directories. In Development Mode both functions pointing to the wright directories.
answered Aug 01 '18 at 10:38 AM
Thanks for letting us know about this. I was able to reproduce this issue, but it is apparently only limited to binary installations of the Engine. When I tested with an Engine I had built from source code, I was able to debug the project successfully. I have entered UE-45748 to have this investigated further.
answered Jun 06 '17 at 07:48 PM
Tim C ♦♦ STAFF
Not working on 4.21.2 macOS. Neither binary vs source nor Xcode vs VS Code helps. Let's play spot the bug: Engine/Source/Programs/UnrealBuildTool/Configuration/UEBuildTarget.cs
There's a corner case check for OSX bundles (though in a hacky way, but it's fine), which strips off Contents/MacOS and assigns it to OutputFilePath. However, OutputFilePath is not accessed again, causing UE_ENGINE_DIRECTORY to be set to relative to the binary's location in the bundle :/
Which also means there's a second bug here: chopping off Contents/MacOS still leaves us a directory higher than what UE_ENGINE_DIRECTORY needs to be set to. Aka UE_ENGINE_DIRECTORY would be relative to project-root/Binaries/Mac/project.app if not for bug #1, but regardless needs to relative to project-root/Binaries/Mac.
The commits, at least on the Release branch, are squashed, but I suspect this is the breaking change:
Maybe not that fixed. That said, it was likely broken beforehand, and I suspect macOS no-editor debugging has never worked out of the box in UE4. I'll also note UE4's "where do I find stuff" logic feels super rickety and is spread out across way too many places and I'm surprised things don't break constantly for no reason. Then again - maybe they do.
Here's a possible fixed version, though it needs a bit more testing. Doesn't break on the ICU data directories, but doesn't find the cooked content unless I explicitly set it with -Sandbox="/Saved/Cooked/MacNoEditor" - suspect there's similar issues with how project dirs are set. If you want to try it, I suggest applying the attached patch file with git apply filename-of-the-attached.patch from the root of a UnrealEngine source checkout. Changed code snippet for reference:
Engine/Source/Programs/UnrealBuildTool has a C# Visual Studio project file, compile that (probably on a Windows machine sry) and you should be able to drop the four Engine/Binaries/DotNET/UnrealBuildTool.* files it into the corresponding directory on a macOS UE installation. Note that a normal build of Unreal Engine won't apply this.
Follow this question
Once you sign in you will be able to subscribe for any updates here