Skip to content

Commit

Permalink
[unity]修复当某个属性没有getter的时候,会导致剩余的property没有设置成功的问题 (#1933)
Browse files Browse the repository at this point in the history
  • Loading branch information
zentia authored Dec 3, 2024
1 parent 49a111c commit eefed71
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions unity/native_src/Src/CppObjectMapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ v8::Local<v8::FunctionTemplate> FCppObjectMapper::GetTemplateOfClass(v8::Isolate
Template->InstanceTemplate()->SetInternalFieldCount(4);

JSPropertyInfo* PropertyInfo = ClassDefinition->Properties;
while (PropertyInfo && PropertyInfo->Name && PropertyInfo->Getter)
while (PropertyInfo && PropertyInfo->Name)
{
v8::PropertyAttribute PropertyAttribute = v8::DontDelete;
if (!PropertyInfo->Setter)
Expand All @@ -224,7 +224,7 @@ v8::Local<v8::FunctionTemplate> FCppObjectMapper::GetTemplateOfClass(v8::Isolate
}

PropertyInfo = ClassDefinition->Variables;
while (PropertyInfo && PropertyInfo->Name && PropertyInfo->Getter)
while (PropertyInfo && PropertyInfo->Name)
{
v8::PropertyAttribute PropertyAttribute = v8::DontDelete;
if (!PropertyInfo->Setter)
Expand Down

0 comments on commit eefed71

Please sign in to comment.