[INTEGRATE] Change 2645725 by Ori.Cohen@Ori.Cohen_T3712 on 2015/08/05 18:39:56

Move skeletal mesh cloth destroy to FinishDestroy. This is needed for when we shut down the editor and call BeginDestroy on all objects regardless of order. The result is that when one of the worlds destroys we flush the global apex buffer and things get deleted out of order.

	#codereview Benn.Gallagher

#JIRA UE-19387

[CL 2645992 by Dan Oconnor in 4.9 branch]
This commit is contained in:
Ori.Cohen
2015-08-05 21:43:59 -04:00
committed by Dan.OConnor@epicgames.com
parent c34d068d04
commit 3760710647
2 changed files with 8 additions and 0 deletions

View File

@@ -737,6 +737,7 @@ public:
virtual void GetAssetRegistryTagMetadata(TMap<FName, FAssetRegistryTagMetadata>& OutMetadata) const override;
#endif // WITH_EDITOR
virtual void BeginDestroy() override;
virtual void FinishDestroy() override;
virtual bool IsReadyForFinishDestroy() override;
virtual void PreSave() override;
virtual void Serialize(FArchive& Ar) override;

View File

@@ -2390,6 +2390,11 @@ void USkeletalMesh::BeginDestroy()
// Release the mesh's render resources.
ReleaseResources();
}
void USkeletalMesh::FinishDestroy()
{
#if WITH_APEX_CLOTHING
// release clothing assets
for (FClothingAssetData& Data : ClothingAssets)
@@ -2401,6 +2406,8 @@ void USkeletalMesh::BeginDestroy()
}
}
#endif // #if WITH_APEX_CLOTHING
Super::FinishDestroy();
}