Yes, you can get the ObjectProperty’s value (which would be an UObject), and iterate that object’s properties like I described above.
In your current ParseProperty method it would be something like :
void USuperPrinterBPLibrary::ParseProperty(FProperty* Property,void* ValuePtr,ACharacter* Target)
{
//...
else if(FObjectProperty* ObjectProperty = CastField<FObjectProperty>(Property))
{
// in UE5 the value is of type TObjectPtr<UObject>
// before UE5 it would probably be UObject*
TObjectPtr<UObject> Obj = ObjectProperty->GetPropertyValue(ValuePtr);
if (Object)
{
for (TFieldIterator<FProperty> It(Obj->GetClass()); It; ++It)
{
FProperty* InnerProp = *It;
void* InnerValuePtr = InnerProp->ContainerPtrToValuePtr<void>(Obj);
ParseProperty(InnerProp, InnerValuePtr, Target);
}
}
}
}
Be careful though, this will easily lead to infinite loops if you have circular object references (eg. ObjectA has a property referencing ObjectB, ObjectB has a property referencing ObjectA).