Skip to content

Commit aeb6b8d

Browse files
author
Roberto De Ioris
committed
fixed ScriptsPath management
1 parent 3f065c4 commit aeb6b8d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Source/UnrealEnginePython/Private/UnrealEnginePython.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,10 +295,11 @@ void FUnrealEnginePythonModule::StartupModule()
295295
}
296296

297297
FString ProjectScriptsPath = FPaths::Combine(*PROJECT_CONTENT_DIR, UTF8_TO_TCHAR("Scripts"));
298-
if (FPaths::DirectoryExists(ProjectScriptsPath))
298+
if (!FPaths::DirectoryExists(ProjectScriptsPath))
299299
{
300-
ScriptsPaths.Add(ProjectScriptsPath);
300+
FPlatformFileManager::Get().GetPlatformFile().CreateDirectory(*ProjectScriptsPath);
301301
}
302+
ScriptsPaths.Add(ProjectScriptsPath);
302303

303304
#if WITH_EDITOR
304305
for (TSharedRef<IPlugin>plugin : IPluginManager::Get().GetEnabledPlugins())

0 commit comments

Comments
 (0)