@@ -207,12 +207,29 @@ static PyObject *py_unreal_engine_shutdown(PyObject *self, PyObject * args)
207
207
Py_RETURN_NONE;
208
208
}
209
209
210
+ static PyObject *py_unreal_engine_set_brutal_finalize (PyObject *self, PyObject * args)
211
+ {
212
+
213
+ PyObject *py_bool = nullptr ;
214
+ if (!PyArg_ParseTuple (args, " |O:set_brutal_finalize" , &py_bool))
215
+ {
216
+ return nullptr ;
217
+ }
218
+
219
+ bool bBrutalFinalize = !py_bool || PyObject_IsTrue (py_bool);
220
+
221
+ FUnrealEnginePythonModule &PythonModule = FModuleManager::GetModuleChecked<FUnrealEnginePythonModule>(" UnrealEnginePython" );
222
+ PythonModule.BrutalFinalize = bBrutalFinalize;
223
+ Py_RETURN_NONE;
224
+ }
225
+
210
226
static PyMethodDef unreal_engine_methods[] = {
211
227
{ " log" , py_unreal_engine_log, METH_VARARGS, " " },
212
228
{ " log_warning" , py_unreal_engine_log_warning, METH_VARARGS, " " },
213
229
{ " log_error" , py_unreal_engine_log_error, METH_VARARGS, " " },
214
230
215
231
{ " shutdown" , py_unreal_engine_shutdown, METH_VARARGS, " " },
232
+ { " set_brutal_finalize" , py_unreal_engine_set_brutal_finalize, METH_VARARGS, " " },
216
233
217
234
{ " add_on_screen_debug_message" , py_unreal_engine_add_on_screen_debug_message, METH_VARARGS, " " },
218
235
{ " print_string" , py_unreal_engine_print_string, METH_VARARGS, " " },
0 commit comments