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

Function py_ue_quit_game

Source/UnrealEnginePython/Private/UEPyWorld.cpp:5–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3
4
5PyObject *py_ue_quit_game(ue_PyUObject *self, PyObject * args) {
6
7 ue_py_check(self);
8
9 UWorld *world = ue_get_uworld(self);
10 if (!world)
11 return PyErr_Format(PyExc_Exception, "unable to retrieve UWorld from uobject");
12
13 // no need to support multiple controllers
14 APlayerController *controller = world->GetFirstPlayerController();
15 if (!controller)
16 return PyErr_Format(PyExc_Exception, "unable to retrieve the first controller");
17
18 UKismetSystemLibrary::QuitGame(world, controller, EQuitPreference::Quit);
19
20 Py_INCREF(Py_None);
21 return Py_None;
22}
23
24PyObject *py_ue_play(ue_PyUObject *self, PyObject * args) {
25

Callers

nothing calls this directly

Calls 1

ue_get_uworldFunction · 0.85

Tested by

no test coverage detected