OSX - Intro to Programming - Example asserts "file exists"

OSX - Intro to Programming - Example asserts “file exists”

Im walking through steps of your video “Intro to programming”, everything compiles fine. But starting “Pizza” program leads to an assert:

/Users/frank/dev/git/Unreal/4.1/UnrealEngine/Engine/Source/Runtime/Core/Private/Internationalization/Internationalization.cpp(188): Assertion failed: FPaths::FileExists(DataDirectory / TEXT(“icudt51l.dat”))

OSX - 10.9.2

This has to do with engine path:
FString DefaultEngineDir = TEXT(“…/…/…/Engine/”);
which might not be correct relative to OSX document path where project is located.
/Documents/Unreal\ Projects/Pizza/Pizza.xcodeproj

Hey,

It’s possible this is caused by not having data from GitHub. Can you check to see if you have icudt51l.dat in correct location? It should be in UnrealEngine/4.1/Engine/Content/Localization. Thanks!

No, its there, but my app wont look there, because its root is in Documents/Unreal Projects/

I’m afraid this a bug in our build system. It doesn’t set UE_ENGINE_DIRECTORY define correctly on for Mac which results in GForeignEngineDir being set to non-existing folder and this makes FGenericPlatformMisc::EngineDir() to revert to …/…/…/Engine/. We’ll fix it for next release, but in a meantime, let me explain a few things that should unblock you.

When you open your project in Xcode, you should have three targets/schemes for your game (plus some additional ones) - “MyProject - iOS”, “MyProject - Mac” and “MyProjectEditor - Mac”. My guess is that you’re trying to build and run “MyProject - Mac”, which is not equivalent of what is built in tutorial. You should be building “MyProjectEditor - Mac” instead.

Running “MyProject - Mac” directly from Xcode is useful pretty much only if you want to debug something in your game using cooked data, which is rarely needed. I guess that’s why we didn’t catch this bug earlier. Normally this target is used by editor to build a game executable for packaging.

I hope this helps. Sorry about confusion caused by differences between how things work in Xcode and Visual Studio. If you need further assistance, let me know.