MCPcopy Create free account
hub / github.com/20tab/UnrealEnginePython / ue_get_uworld

Function ue_get_uworld

Source/UnrealEnginePython/Private/UEPyModule.cpp:1194–1211  ·  view source on GitHub ↗

retrieve a UWorld from a generic UObject (if possible)

Source from the content-addressed store, hash-verified

1192
1193// retrieve a UWorld from a generic UObject (if possible)
1194UWorld *ue_get_uworld(ue_PyUObject *py_obj) {
1195
1196 if (py_obj->ue_object->IsA<UWorld>()) {
1197 return (UWorld *)py_obj->ue_object;
1198 }
1199
1200 if (py_obj->ue_object->IsA<AActor>()) {
1201 AActor *actor = (AActor *)py_obj->ue_object;
1202 return actor->GetWorld();
1203 }
1204
1205 if (py_obj->ue_object->IsA<UActorComponent>()) {
1206 UActorComponent *component = (UActorComponent *)py_obj->ue_object;
1207 return component->GetWorld();
1208 }
1209
1210 return nullptr;
1211}
1212
1213// retrieve actor from component (if possible)
1214AActor *ue_get_actor(ue_PyUObject *py_obj) {

Callers 15

py_ue_is_input_key_downFunction · 0.85
py_ue_is_action_pressedFunction · 0.85
py_ue_is_action_releasedFunction · 0.85
py_ue_enable_inputFunction · 0.85
py_ue_show_mouse_cursorFunction · 0.85
py_ue_set_timerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected