Skip to content

Commit 8abed44

Browse files
author
Roberto De Ioris
committed
added support for unsigned integer in properties
1 parent f35299f commit 8abed44

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Source/UnrealEnginePython/Private/UEPyModule.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2363,13 +2363,27 @@ bool ue_py_convert_pyobject(PyObject *py_obj, UProperty *prop, uint8 *buffer)
23632363
Py_DECREF(py_long);
23642364
return true;
23652365
}
2366+
if (auto casted_prop = Cast<UUInt32Property>(prop))
2367+
{
2368+
PyObject *py_long = PyNumber_Long(py_obj);
2369+
casted_prop->SetPropertyValue_InContainer(buffer, PyLong_AsUnsignedLong(py_long));
2370+
Py_DECREF(py_long);
2371+
return true;
2372+
}
23662373
if (auto casted_prop = Cast<UInt64Property>(prop))
23672374
{
23682375
PyObject *py_long = PyNumber_Long(py_obj);
23692376
casted_prop->SetPropertyValue_InContainer(buffer, PyLong_AsLongLong(py_long));
23702377
Py_DECREF(py_long);
23712378
return true;
23722379
}
2380+
if (auto casted_prop = Cast<UUInt64Property>(prop))
2381+
{
2382+
PyObject *py_long = PyNumber_Long(py_obj);
2383+
casted_prop->SetPropertyValue_InContainer(buffer, PyLong_AsUnsignedLongLong(py_long));
2384+
Py_DECREF(py_long);
2385+
return true;
2386+
}
23732387
if (auto casted_prop = Cast<UFloatProperty>(prop))
23742388
{
23752389
PyObject *py_float = PyNumber_Float(py_obj);

0 commit comments

Comments
 (0)