From 96824b46290b7ac98f1f0a0c711b13e31b48bad5 Mon Sep 17 00:00:00 2001 From: FishOrBear Date: Thu, 1 Jul 2021 11:02:18 +0800 Subject: [PATCH] =?UTF-8?q?=E9=81=BF=E5=85=8D=E9=87=8D=E5=A4=8D=E6=9E=84?= =?UTF-8?q?=E5=BB=BADF=E9=98=B4=E5=BD=B1,=E5=B9=B6=E4=B8=94=E5=8F=AA?= =?UTF-8?q?=E5=9C=A8=E9=9C=80=E8=A6=81=E6=97=B6=E4=BF=9D=E7=95=99=E7=BD=91?= =?UTF-8?q?=E6=A0=BC=E7=9A=84=E9=A1=B6=E7=82=B9=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Source/MeshUtilities2/Private/DistanceFieldAtlas2.cpp | 3 +++ .../RuntimeGeometryUtils/Private/MeshComponentRuntimeUtils.cpp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Plugins/MeshUtilities2/Source/MeshUtilities2/Private/DistanceFieldAtlas2.cpp b/Plugins/MeshUtilities2/Source/MeshUtilities2/Private/DistanceFieldAtlas2.cpp index 3df1204..1725f9e 100644 --- a/Plugins/MeshUtilities2/Source/MeshUtilities2/Private/DistanceFieldAtlas2.cpp +++ b/Plugins/MeshUtilities2/Source/MeshUtilities2/Private/DistanceFieldAtlas2.cpp @@ -57,6 +57,9 @@ static FAutoConsoleVariableRef CVarAOAsyncBuildQueue( //构建距离场 void BuildMeshDistanceField(UStaticMesh* StaticMesh) { + GDistanceFieldAsyncQueue2->CancelBuild(StaticMesh); + GCardRepresentationAsyncQueue2->CancelBuild(StaticMesh); + //ref:StaticMesh.cpp 2782 auto RenderData = StaticMesh->GetRenderData(); if (RenderData->LODResources.IsValidIndex(0)) diff --git a/Plugins/RuntimeGeometryUtils/Source/RuntimeGeometryUtils/Private/MeshComponentRuntimeUtils.cpp b/Plugins/RuntimeGeometryUtils/Source/RuntimeGeometryUtils/Private/MeshComponentRuntimeUtils.cpp index 755e942..aa104f1 100644 --- a/Plugins/RuntimeGeometryUtils/Source/RuntimeGeometryUtils/Private/MeshComponentRuntimeUtils.cpp +++ b/Plugins/RuntimeGeometryUtils/Source/RuntimeGeometryUtils/Private/MeshComponentRuntimeUtils.cpp @@ -29,7 +29,7 @@ void RTGUtils::UpdateStaticMeshFromDynamicMesh( UStaticMesh::FBuildMeshDescriptionsParams Params; Params.bFastBuild = true; - StaticMesh->BuildFromMeshDescriptions(MeshDescriptionPtrs,Params); + StaticMesh->BuildFromMeshDescriptions(MeshDescriptionPtrs, Params, true); //在编辑器模式下,也使用自定义的距离场构建和MeshCard构建 BuildMeshDistanceField(StaticMesh);