Skip to content

Commit

Permalink
[unity]支持仅setter的属性
Browse files Browse the repository at this point in the history
  • Loading branch information
chexiongsheng committed Dec 3, 2024
1 parent b4bc0a4 commit c0a018d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions unreal/Puerts/Source/JsEnv/Private/CppObjectMapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,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 @@ -187,7 +187,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 c0a018d

Please sign in to comment.