diff --git a/Source/PythonEditor/Private/PYRichTextSyntaxHighlighterTextLayoutMarshaller.cpp b/Source/PythonEditor/Private/PYRichTextSyntaxHighlighterTextLayoutMarshaller.cpp index b6303bf18..8a62710a4 100644 --- a/Source/PythonEditor/Private/PYRichTextSyntaxHighlighterTextLayoutMarshaller.cpp +++ b/Source/PythonEditor/Private/PYRichTextSyntaxHighlighterTextLayoutMarshaller.cpp @@ -311,7 +311,7 @@ void FPYRichTextSyntaxHighlighterTextLayoutMarshaller::ParseTokens(const FString FRunInfo RunInfo(TEXT("SyntaxHighlight.PY.Normal")); FTextBlockStyle TextBlockStyle = SyntaxTextStyle.NormalTextStyle; - const bool bIsWhitespace = FString(TokenText).TrimTrailing().IsEmpty(); + const bool bIsWhitespace = FString(TokenText).TrimEnd().IsEmpty(); if(!bIsWhitespace) { bool bHasMatchedSyntax = false; diff --git a/Source/UnrealEnginePython/Private/UEPyEngine.cpp b/Source/UnrealEnginePython/Private/UEPyEngine.cpp index 73554e8d0..6f0dc7d4b 100644 --- a/Source/UnrealEnginePython/Private/UEPyEngine.cpp +++ b/Source/UnrealEnginePython/Private/UEPyEngine.cpp @@ -161,7 +161,7 @@ PyObject *py_unreal_engine_get_up_vector(PyObject * self, PyObject * args) PyObject *py_unreal_engine_get_content_dir(PyObject * self, PyObject * args) { - return PyUnicode_FromString(TCHAR_TO_UTF8(*FPaths::GameContentDir())); + return PyUnicode_FromString(TCHAR_TO_UTF8(*FPaths::ProjectContentDir())); } PyObject *py_unreal_engine_convert_relative_path_to_full(PyObject * self, PyObject * args) diff --git a/Source/UnrealEnginePython/Private/UnrealEnginePython.cpp b/Source/UnrealEnginePython/Private/UnrealEnginePython.cpp index 288a010a9..7d81a7bd5 100644 --- a/Source/UnrealEnginePython/Private/UnrealEnginePython.cpp +++ b/Source/UnrealEnginePython/Private/UnrealEnginePython.cpp @@ -88,11 +88,11 @@ void FUnrealEnginePythonModule::UESetupPythonInterpreter(bool verbose) { PyObject *py_path = PyDict_GetItemString(py_sys_dict, "path"); - char *zip_path = TCHAR_TO_UTF8(*FPaths::ConvertRelativePathToFull(FPaths::Combine(FPaths::GameContentDir(), FString("ue_python.zip")))); + char *zip_path = TCHAR_TO_UTF8(*FPaths::ConvertRelativePathToFull(FPaths::Combine(PROJECT_CONTENT_DIR, FString("ue_python.zip")))); PyObject *py_zip_path = PyUnicode_FromString(zip_path); PyList_Insert(py_path, 0, py_zip_path); - char *scripts_path = TCHAR_TO_UTF8(*FPaths::ConvertRelativePathToFull(FPaths::Combine(FPaths::GameContentDir(), FString("Scripts")))); + char *scripts_path = TCHAR_TO_UTF8(*FPaths::ConvertRelativePathToFull(FPaths::Combine(PROJECT_CONTENT_DIR, FString("Scripts")))); PyObject *py_scripts_path = PyUnicode_FromString(scripts_path); PyList_Insert(py_path, 0, py_scripts_path); @@ -103,7 +103,7 @@ void FUnrealEnginePythonModule::UESetupPythonInterpreter(bool verbose) { PyList_Insert(py_path, 0, py_plugin_scripts_path); /* add the plugin paths - windows only */ - FString PythonHome = FPaths::ConvertRelativePathToFull(FPaths::Combine(FPaths::GamePluginsDir(), FString("UnrealEnginePython/Binaries/Win64"))); + FString PythonHome = FPaths::ConvertRelativePathToFull(FPaths::Combine(PROJECT_CONTENT_DIR, FString("UnrealEnginePython/Binaries/Win64"))); char *python_path = TCHAR_TO_UTF8(*PythonHome); char *site_path = TCHAR_TO_UTF8(*FPaths::Combine(FString(PythonHome), FString("Lib/site-packages"))); PyList_Insert(py_path, 0, PyUnicode_FromString(python_path)); diff --git a/Source/UnrealEnginePython/UnrealEnginePython.Build.cs b/Source/UnrealEnginePython/UnrealEnginePython.Build.cs index 6a6d3aa4d..be1e9e3a6 100644 --- a/Source/UnrealEnginePython/UnrealEnginePython.Build.cs +++ b/Source/UnrealEnginePython/UnrealEnginePython.Build.cs @@ -251,7 +251,7 @@ public UnrealEnginePython(TargetInfo Target) } else if (Target.Platform == UnrealTargetPlatform.Linux) { - string[] items = pythonHome.Split(';'); + string[] items = PythonHome.Split(';'); PublicIncludePaths.Add(items[0]); PublicAdditionalLibraries.Add(items[1]); }