From 892499b79850c3a45f185d24c3ba215c44106a46 Mon Sep 17 00:00:00 2001 From: johnche Date: Thu, 31 Oct 2024 15:27:43 +0800 Subject: [PATCH] [unreal]fix warning: https://github.com/Tencent/puerts/issues/1872 --- unreal/Puerts/Source/PuertsEditor/Private/PEBlueprintAsset.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unreal/Puerts/Source/PuertsEditor/Private/PEBlueprintAsset.cpp b/unreal/Puerts/Source/PuertsEditor/Private/PEBlueprintAsset.cpp index b7fbd27a5b..65e3f88864 100644 --- a/unreal/Puerts/Source/PuertsEditor/Private/PEBlueprintAsset.cpp +++ b/unreal/Puerts/Source/PuertsEditor/Private/PEBlueprintAsset.cpp @@ -999,7 +999,7 @@ void UPEBlueprintAsset::SetupAttachment(FName InComponentName, FName InParentCom { NeedSave = true; Blueprint->SimpleConstructionScript->RemoveNode(SCS_Node); - USceneComponent* SceneComponentTemplate = Cast(SCS_Node->ComponentClass); + USceneComponent* SceneComponentTemplate = Cast(SCS_Node->ComponentClass->GetDefaultObject()); if (SceneComponentTemplate) { // Save current state