Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions 1 Source/UnrealEnginePython/Private/UEPyModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,7 @@ static PyMethodDef ue_PyUObject_methods[] = {
{ "save_config", (PyCFunction)py_ue_save_config, METH_VARARGS, "" },
{ "get_actor_label", (PyCFunction)py_ue_get_actor_label, METH_VARARGS, "" },
{ "set_actor_label", (PyCFunction)py_ue_set_actor_label, METH_VARARGS, "" },
{ "set_actor_hidden_in_game", (PyCFunction)py_ue_set_actor_hidden_in_game, METH_VARARGS, "" },

{ "get_editor_world_counterpart_actor", (PyCFunction)py_ue_get_editor_world_counterpart_actor, METH_VARARGS, "" },
{ "component_type_registry_invalidate_class", (PyCFunction)py_ue_component_type_registry_invalidate_class, METH_VARARGS, "" },
Expand Down
29 changes: 29 additions & 0 deletions 29 Source/UnrealEnginePython/Private/UObject/UEPyActor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,35 @@ PyObject *py_ue_set_actor_label(ue_PyUObject *self, PyObject * args)
Py_RETURN_NONE;
}

PyObject *py_ue_set_actor_hidden_in_game(ue_PyUObject *self, PyObject * args)
{

ue_py_check(self);

AActor *actor = ue_get_actor(self);
if (!actor)
return PyErr_Format(PyExc_Exception, "cannot retrieve Actor from uobject");

PyObject *py_bool = nullptr;
if (!PyArg_ParseTuple(args, "O:set_actor_hidden_in_game", &py_bool))
{
return nullptr;
}

if (PyObject_IsTrue(py_bool))
{
actor->SetActorHiddenInGame(true);
}
else
{
actor->SetActorHiddenInGame(false);
}



Py_RETURN_NONE;
}

PyObject *py_ue_find_actor_by_label(ue_PyUObject * self, PyObject * args)
{

Expand Down
1 change: 1 addition & 0 deletions 1 Source/UnrealEnginePython/Private/UObject/UEPyActor.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ PyObject *py_ue_actor_set_level_sequence(ue_PyUObject *, PyObject *);
#if WITH_EDITOR
PyObject *py_ue_get_actor_label(ue_PyUObject *, PyObject *);
PyObject *py_ue_set_actor_label(ue_PyUObject *, PyObject *);
PyObject *py_ue_set_actor_hidden_in_game(ue_PyUObject *, PyObject *);
PyObject *py_ue_find_actor_by_label(ue_PyUObject *, PyObject *);
PyObject *py_ue_get_editor_world_counterpart_actor(ue_PyUObject *, PyObject *);
PyObject *py_ue_component_type_registry_invalidate_class(ue_PyUObject *, PyObject *);
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.