@@ -153,10 +153,12 @@ void register_uobject_children(py::module_& mod) {
153153 " Returns:\n "
154154 " True if this class implements the interface, false otherwise." ,
155155 " interface" _a)
156- .def_readwrite (" ClassDefaultObject" , &UClass::ClassDefaultObject)
156+ .def_property (
157+ " ClassDefaultObject" , [](const UClass* self) { return self->ClassDefaultObject (); },
158+ [](UClass* self, UObject* value) { self->ClassDefaultObject () = value; })
157159 .def_property_readonly (" Interfaces" , [](const UClass* self) {
158160 std::vector<UClass*> interfaces{};
159- for (const auto & iface : self->Interfaces ) {
161+ for (const auto & iface : self->Interfaces () ) {
160162 interfaces.push_back (iface.Class );
161163 }
162164 return interfaces;
@@ -179,10 +181,18 @@ void register_uobject_children(py::module_& mod) {
179181 " \n "
180182 " Returns:\n "
181183 " The return param, or None if it doesn't exist." )
182- .def_readwrite (" FunctionFlags" , &UFunction::FunctionFlags)
183- .def_readwrite (" NumParams" , &UFunction::NumParams)
184- .def_readwrite (" ParamsSize" , &UFunction::ParamsSize)
185- .def_readwrite (" ReturnValueOffset" , &UFunction::ReturnValueOffset);
184+ .def_property (
185+ " FunctionFlags" , [](const UFunction* self) { return self->FunctionFlags (); },
186+ [](UFunction* self, uint32_t value) { self->FunctionFlags () = value; })
187+ .def_property (
188+ " NumParams" , [](const UFunction* self) { return self->NumParams (); },
189+ [](UFunction* self, uint8_t value) { self->NumParams () = value; })
190+ .def_property (
191+ " ParamsSize" , [](const UFunction* self) { return self->ParamsSize (); },
192+ [](UFunction* self, uint16_t value) { self->ParamsSize () = value; })
193+ .def_property (
194+ " ReturnValueOffset" , [](const UFunction* self) { return self->ReturnValueOffset (); },
195+ [](UFunction* self, uint16_t value) { self->ReturnValueOffset () = value; });
186196
187197 PyUEClass<UInt8Property, UProperty>(mod, " UInt8Property" );
188198
@@ -204,7 +214,9 @@ void register_uobject_children(py::module_& mod) {
204214 .def_property_readonly (" PropertyClass" , &UObjectProperty::get_property_class);
205215
206216 PyUEClass<UScriptStruct, UStruct>(mod, " UScriptStruct" )
207- .def_readwrite (" StructFlags" , &UScriptStruct::StructFlags);
217+ .def_property (
218+ " StructFlags" , [](const UScriptStruct* self) { return self->StructFlags (); },
219+ [](UScriptStruct* self, uint32_t value) { self->StructFlags () = value; });
208220
209221 PyUEClass<UStrProperty, UProperty>(mod, " UStrProperty" );
210222
0 commit comments