From 2b8b171ae2832e8bd59051b5a588fa07cff5c6af Mon Sep 17 00:00:00 2001 From: Henrik Berglund Date: Mon, 1 Apr 2019 17:59:13 +0200 Subject: [PATCH] Fix for 4.22 UWorld packaging error --- Source/UnrealEnginePython/Private/UEPyModule.cpp | 3 +++ Source/UnrealEnginePython/Private/UObject/UEPyWorld.cpp | 2 ++ 2 files changed, 5 insertions(+) diff --git a/Source/UnrealEnginePython/Private/UEPyModule.cpp b/Source/UnrealEnginePython/Private/UEPyModule.cpp index 993828a86..9558afc95 100644 --- a/Source/UnrealEnginePython/Private/UEPyModule.cpp +++ b/Source/UnrealEnginePython/Private/UEPyModule.cpp @@ -879,7 +879,10 @@ static PyMethodDef ue_PyUObject_methods[] = { { "get_levels", (PyCFunction)py_ue_get_levels, METH_VARARGS, "" }, { "get_current_level", (PyCFunction)py_ue_get_current_level, METH_VARARGS, "" }, + +#if WITH_EDITORONLY_DATA { "set_current_level", (PyCFunction)py_ue_set_current_level, METH_VARARGS, "" }, +#endif #if WITH_EDITOR { "get_level_script_blueprint", (PyCFunction)py_ue_get_level_script_blueprint, METH_VARARGS, "" }, diff --git a/Source/UnrealEnginePython/Private/UObject/UEPyWorld.cpp b/Source/UnrealEnginePython/Private/UObject/UEPyWorld.cpp index ec2be2b7c..1d903ae36 100644 --- a/Source/UnrealEnginePython/Private/UObject/UEPyWorld.cpp +++ b/Source/UnrealEnginePython/Private/UObject/UEPyWorld.cpp @@ -298,6 +298,7 @@ PyObject *py_ue_get_current_level(ue_PyUObject *self, PyObject * args) Py_RETURN_UOBJECT(level); } +#if WITH_EDITORONLY_DATA PyObject *py_ue_set_current_level(ue_PyUObject *self, PyObject * args) { @@ -321,6 +322,7 @@ PyObject *py_ue_set_current_level(ue_PyUObject *self, PyObject * args) Py_RETURN_FALSE; } +#endif #if WITH_EDITOR PyObject *py_ue_get_level_script_blueprint(ue_PyUObject *self, PyObject * args)