Skip to content

Commit

Permalink
[unreal]subobject和asset还是由外部指定所有权 (#1663)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tangxinwei authored Feb 26, 2024
1 parent 3d5454a commit 56b98be
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions unreal/Puerts/Source/JsEnv/Private/JsEnvImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1709,10 +1709,9 @@ void FJsEnvImpl::Bind(FClassWrapper* ClassWrapper, UObject* UEObject,
const bool IsNativeTakeJsRef = ClassWrapper->IsNativeTakeJsRef;
#else
const bool ClassWrapperIsNativeTakeJsRef = ClassWrapper->IsNativeTakeJsRef; //这个值只有mixin会进行设置
const bool IsAsset =
UEObject->HasAnyFlags(RF_DefaultSubObject | RF_ClassDefaultObject | RF_ArchetypeObject) || UEObject->IsAsset();
const bool IsUClass = UEObject->IsA<UClass>();
const bool IsNativeTakeJsRef = (IsAsset || IsUClass) ? false : ClassWrapperIsNativeTakeJsRef;
const bool IsCDO = UEObject->HasAnyFlags(RF_ClassDefaultObject | RF_ArchetypeObject);
const bool IsNativeTakeJsRef = (IsCDO || IsUClass) ? false : ClassWrapperIsNativeTakeJsRef;
#endif

DataTransfer::SetPointer(MainIsolate, JSObject, UEObject, 0);
Expand Down

0 comments on commit 56b98be

Please sign in to comment.