Fix running game in non-ANSI path

#480
This commit is contained in:
Wojtek Figat
2023-10-12 22:29:48 +02:00
parent 677cd4e382
commit 74a69b8f13
4 changed files with 21 additions and 18 deletions

View File

@@ -596,11 +596,13 @@ void EngineImpl::InitPaths()
Globals::ProjectCacheFolder = Globals::ProjectFolder / TEXT("Cache");
#endif
#if USE_MONO
// We must ensure that engine is located in folder which path contains only ANSI characters
// Why? Mono lib must have etc and lib folders at ANSI path
// But project can be located on Unicode path
if (!Globals::StartupFolder.IsANSI())
Platform::Fatal(TEXT("Cannot start application in directory which name contains non-ANSI characters."));
#endif
#if !PLATFORM_SWITCH && !FLAX_TESTS
// Setup directories