retrieve actor from component (if possible)
| 1212 | |
| 1213 | // retrieve actor from component (if possible) |
| 1214 | AActor *ue_get_actor(ue_PyUObject *py_obj) { |
| 1215 | if (py_obj->ue_object->IsA<AActor>()) { |
| 1216 | return (AActor *)py_obj->ue_object; |
| 1217 | } |
| 1218 | |
| 1219 | if (py_obj->ue_object->IsA<UActorComponent>()) { |
| 1220 | UActorComponent *tmp_component = (UActorComponent *)py_obj->ue_object; |
| 1221 | return tmp_component->GetOwner(); |
| 1222 | } |
| 1223 | return nullptr; |
| 1224 | } |
| 1225 | |
| 1226 | // convert a property to a python object |
| 1227 | PyObject *ue_py_convert_property(UProperty *prop, uint8 *buffer) { |
no outgoing calls
no test coverage detected