From 9854814824d4f3e86808d6036b11f6eeb6707830 Mon Sep 17 00:00:00 2001 From: girlgg <76723700+girlgg@users.noreply.github.com> Date: Thu, 14 Nov 2024 23:16:56 +0800 Subject: [PATCH] Fix Packaging Bug Due to a bug in UE, only pointers can be passed instead of references, as passing references causes a conflict between FORCEINLINE and ENGINE_API. The calling method has been modified to fix this bug, allowing the plugin to package correctly. --- Source/MDARuntime/Private/AnimNode_MDA.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Source/MDARuntime/Private/AnimNode_MDA.cpp b/Source/MDARuntime/Private/AnimNode_MDA.cpp index 6236b9b..9d203b8 100644 --- a/Source/MDARuntime/Private/AnimNode_MDA.cpp +++ b/Source/MDARuntime/Private/AnimNode_MDA.cpp @@ -234,9 +234,16 @@ void FAnimNode_MDA::BlendCurves1(const TArrayView SourceCur if (SourceCurves.IsEmpty()) return; + + TArray SourceCurvesPtr; + for (const FBlendedCurve& Curve : SourceCurves) + { + SourceCurvesPtr.Add(&Curve); + } + if (BlendOption == ECurveBlendOption::Type::BlendByWeight) { - BlendCurves(SourceCurves, SourceWeights, OutCurve); + BlendCurves(SourceCurvesPtr, SourceWeights, OutCurve); } else if (BlendOption == ECurveBlendOption::Type::NormalizeByWeight) { @@ -255,11 +262,11 @@ void FAnimNode_MDA::BlendCurves1(const TArrayView SourceCur NormalizeSourceWeights[Idx] = SourceWeights[Idx] / SumOfWeight; } - BlendCurves(SourceCurves, NormalizeSourceWeights, OutCurve); + BlendCurves(SourceCurvesPtr, NormalizeSourceWeights, OutCurve); } else { - BlendCurves(SourceCurves, SourceWeights, OutCurve); + BlendCurves(SourceCurvesPtr, SourceWeights, OutCurve); } } else if (BlendOption == ECurveBlendOption::Type::UseMaxValue)