|
25 | 25 | #include "UEPyAssetUserData.h" |
26 | 26 | #include "UEPyTexture.h" |
27 | 27 | #include "UEPyMaterial.h" |
| 28 | +#include "UEPyPawn.h" |
| 29 | +#include "UEPyController.h" |
28 | 30 | #if WITH_EDITOR |
29 | 31 | #include "UEPyEditor.h" |
30 | 32 | #include "UEPyEdGraph.h" |
@@ -510,6 +512,13 @@ static PyMethodDef ue_PyUObject_methods[] = { |
510 | 512 |
|
511 | 513 | { "get_overlapping_actors", (PyCFunction)py_ue_get_overlapping_actors, METH_VARARGS, "" }, |
512 | 514 |
|
| 515 | + // Pawn |
| 516 | + { "get_controller", (PyCFunction)py_ue_pawn_get_controller, METH_VARARGS, "" }, |
| 517 | + |
| 518 | + // Controller |
| 519 | + { "posses", (PyCFunction)py_ue_controller_posses, METH_VARARGS, "" }, |
| 520 | + { "unposses", (PyCFunction)py_ue_controller_unposses, METH_VARARGS, "" }, |
| 521 | + |
513 | 522 |
|
514 | 523 | // Attaching |
515 | 524 |
|
@@ -587,8 +596,8 @@ void ue_pydelegates_cleanup(ue_PyUObject *self) { |
587 | 596 | UE_LOG(LogPython, Warning, TEXT("Removing UPythonDelegate %p from ue_PyUObject %p mapped to UObject %p"), py_delegate, self, self->ue_object); |
588 | 597 | #endif |
589 | 598 | py_delegate->RemoveFromRoot(); |
| 599 | + } |
590 | 600 | } |
591 | | -} |
592 | 601 | self->python_delegates_gc->clear(); |
593 | 602 | delete self->python_delegates_gc; |
594 | 603 | self->python_delegates_gc = nullptr; |
@@ -1263,7 +1272,7 @@ void unreal_engine_py_log_error() { |
1263 | 1272 | } |
1264 | 1273 |
|
1265 | 1274 | PyErr_Clear(); |
1266 | | - } |
| 1275 | +} |
1267 | 1276 |
|
1268 | 1277 | // retrieve a UWorld from a generic UObject (if possible) |
1269 | 1278 | UWorld *ue_get_uworld(ue_PyUObject *py_obj) { |
|
0 commit comments