// this is always shallow, can't see that we would want it any other way bool UAssetObjectProperty::Identical( const void* A, const void* B, uint32 PortFlags ) const { FAssetPtr ObjectA = A ? *((FAssetPtr*)A) : FAssetPtr(); FAssetPtr ObjectB = B ? *((FAssetPtr*)B) : FAssetPtr(); return ObjectA.GetUniqueID() == ObjectB.GetUniqueID(); }
void UAssetObjectProperty::SerializeItem( FArchive& Ar, void* Value, int32 MaxReadBytes, void const* Defaults ) const { // We never serialize our reference while the garbage collector is harvesting references // to objects, because we don't want asset pointers to keep objects from being garbage collected if( !Ar.IsObjectReferenceCollector() || Ar.IsModifyingWeakAndStrongReferences() ) { FAssetPtr OldValue = *(FAssetPtr*)Value; Ar << *(FAssetPtr*)Value; if (Ar.IsLoading() || Ar.IsModifyingWeakAndStrongReferences()) { if (OldValue.GetUniqueID() != ((FAssetPtr*)Value)->GetUniqueID()) { CheckValidObject(Value); } } } }
void UAssetObjectProperty::SerializeItem( FArchive& Ar, void* Value, void const* Defaults ) const { // We never serialize our reference while the garbage collector is harvesting references // to objects, because we don't want asset pointers to keep objects from being garbage collected // Allow persistent archives so they can keep track of string references. (e.g. FArchiveSaveTagImports) if( !Ar.IsObjectReferenceCollector() || Ar.IsModifyingWeakAndStrongReferences() || Ar.IsPersistent() ) { FAssetPtr OldValue = *(FAssetPtr*)Value; Ar << *(FAssetPtr*)Value; if (Ar.IsLoading() || Ar.IsModifyingWeakAndStrongReferences()) { if (OldValue.GetUniqueID() != ((FAssetPtr*)Value)->GetUniqueID()) { CheckValidObject(Value); } } } }