Description

Ensure hit when adding a Blueprinted scene component that derives from a native component that has its own subcomponent. This does not occur when adding the native component, only when adding the blueprinted derivative. 

Steps to Reproduce
  • Create a native class that derives from USceneComponent and make it Blueprintable (MyComponent)
  • Give it a USceneComponent* UPROPERTY to hold a reference to a subcomponent
  • Create the default subcomponent "CreateDefaultSubobject<USceneComponent>" and assign it to that UPROPERTY in MyComponent's constructor
  • Create a blueprint that derives from MyComponent
  • Add the component to an actor instance
  • Notice ensure is hit in USceneComponent::AttachToComponent "Template Mismatch during attachment. Attaching instanced component to template component."
Callstack

> UE4Editor-Engine.dll!USceneComponent::AttachToComponent(USceneComponent * Parent, const FAttachmentTransformRules & AttachmentRules, FName SocketName) Line 2108 C++
UE4Editor-Engine.dll!USceneComponent::OnRegister() Line 657 C++
UE4Editor-Engine.dll!UPrimitiveComponent::OnRegister() Line 595 C++
UE4Editor-Engine.dll!UActorComponent::ExecuteRegisterEvents() Line 1430 C++
UE4Editor-Engine.dll!UActorComponent::RegisterComponentWithWorld(UWorld * InWorld) Line 1161 C++
UE4Editor-Kismet.dll!SSCSEditor::AddNewComponent(UClass * NewComponentClass, UObject * Asset, const bool bSkipMarkBlueprintModified, bool bSetFocusToNewItem) Line 5332 C++
UE4Editor-Kismet.dll!SSCSEditor::PerformComboAddClass(TSubclassOf<UActorComponent> ComponentClass, EComponentCreateAction::Type ComponentCreateAction, UObject * AssetOverride) Line 4366 C++
[Inline Frame] UE4Editor-Kismet.dll!TMemberFunctionCaller<SSCSEditor,UActorComponent * (__cdecl SSCSEditor::*)(TSubclassOf<UActorComponent>,enum EComponentCreateAction::Type,UObject *)>::operator()(TSubclassOf<UActorComponent> &) Line 156 C++
[Inline Frame] UE4Editor-Kismet.dll!UE4Tuple_Private::TTupleImpl<TIntegerSequence<unsigned int>>::ApplyAfter(TMemberFunctionCaller<SSCSEditor,UActorComponent * (__cdecl SSCSEditor::*)(TSubclassOf<UActorComponent>,enum EComponentCreateAction::Type,UObject *)> &&) Line 285 C++
UE4Editor-Kismet.dll!TBaseSPMethodDelegateInstance<0,SSCSEditor,0,UActorComponent * __cdecl(TSubclassOf<UActorComponent>,enum EComponentCreateAction::Type,UObject *)>::Execute(TSubclassOf<UActorComponent> <Params_0>, EComponentCreateAction::Type <Params_1>, UObject * <Params_2>) Line 298 C++
[Inline Frame] UE4Editor-UnrealEd.dll!TBaseDelegate<UActorComponent *,TSubclassOf<UActorComponent>,enum EComponentCreateAction::Type,UObject *>::Execute(TSubclassOf<UActorComponent> <Params_1>, EComponentCreateAction::Type) Line 586 C++
UE4Editor-UnrealEd.dll!SComponentClassCombo::OnAddComponentSelectionChanged(TSharedPtr<FComponentClassComboEntry,0> InItem, ESelectInfo::Type SelectInfo) Line 277 C++
[Inline Frame] UE4Editor-UnrealEd.dll!TMemberFunctionCaller<SComponentClassCombo,void (__cdecl SComponentClassCombo::*)(TSharedPtr<FComponentClassComboEntry,0>,enum ESelectInfo::Type)>::operator()(TSharedPtr<FComponentClassComboEntry,0> &) Line 156 C++
[Inline Frame] UE4Editor-UnrealEd.dll!UE4Tuple_Private::TTupleImpl<TIntegerSequence<unsigned int>>::ApplyAfter(TMemberFunctionCaller<SComponentClassCombo,void (__cdecl SComponentClassCombo::*)(TSharedPtr<FComponentClassComboEntry,0>,enum ESelectInfo::Type)> &&) Line 285 C++
[Inline Frame] UE4Editor-UnrealEd.dll!TBaseSPMethodDelegateInstance<0,SComponentClassCombo,0,TTypeWrapper<void> __cdecl(TSharedPtr<FComponentClassComboEntry,0>,enum ESelectInfo::Type)>::Execute(TSharedPtr<FComponentClassComboEntry,0>) Line 298 C++
UE4Editor-UnrealEd.dll!TBaseSPMethodDelegateInstance<0,SComponentClassCombo,0,void __cdecl(TSharedPtr<FComponentClassComboEntry,0>,enum ESelectInfo::Type)>::ExecuteIfSafe(TSharedPtr<FComponentClassComboEntry,0> <Params_0>, ESelectInfo::Type <Params_1>) Line 374 C++
[Inline Frame] UE4Editor-UnrealEd.dll!TBaseDelegate<void,TSharedPtr<FComponentClassComboEntry,0>,enum ESelectInfo::Type>::ExecuteIfBound(TSharedPtr<FComponentClassComboEntry,0>) Line 673 C++
UE4Editor-UnrealEd.dll!SListView<TSharedPtr<FComponentClassComboEntry,0>>::Private_SignalSelectionChanged(ESelectInfo::Type SelectInfo) Line 810 C++
UE4Editor-UnrealEd.dll!SComboRow<TSharedPtr<FString,0>>::OnMouseButtonDown(const FGeometry & MyGeometry, const FPointerEvent & MouseEvent) Line 76 C++
[Inline Frame] UE4Editor-Slate.dll!FSlateApplication::RoutePointerDownEvent::__l5::<lambda_3008f576504c0c19c83032846bbd2c02>::operator()(const FArrangedWidget) Line 4573 C++
UE4Editor-Slate.dll!FEventRouter::Route<FReply,FEventRouter::FBubblePolicy,FPointerEvent,<lambda_3008f576504c0c19c83032846bbd2c02>>(FSlateApplication * ThisApplication, FEventRouter::FBubblePolicy RoutingPolicy, FPointerEvent EventCopy, const FSlateApplication::RoutePointerDownEvent::__l5::<lambda_3008f576504c0c19c83032846bbd2c02> & Lambda) Line 372 C++
UE4Editor-Slate.dll!FSlateApplication::RoutePointerDownEvent(const FWidgetPath & WidgetsUnderPointer, const FPointerEvent & PointerEvent) Line 4559 C++
UE4Editor-Slate.dll!FSlateApplication::ProcessMouseButtonDownEvent(const TSharedPtr<FGenericWindow,0> & PlatformWindow, const FPointerEvent & MouseEvent) Line 4513 C++
UE4Editor-Slate.dll!FSlateApplication::OnMouseDown(const TSharedPtr<FGenericWindow,0> & PlatformWindow, const EMouseButtons::Type Button, const FVector2D CursorPos) Line 4420 C++
UE4Editor-ApplicationCore.dll!FWindowsApplication::ProcessDeferredMessage(const FDeferredWindowsMessage & DeferredMessage) Line 1970 C++
UE4Editor-ApplicationCore.dll!FWindowsApplication::DeferMessage(TSharedPtr<FWindowsWindow,0> & NativeWindow, HWND__ * InHWnd, unsigned int InMessage, unsigned __int64 InWParam, __int64 InLParam, int MouseX, int MouseY, unsigned int RawInputFlags) Line 2414 C++
UE4Editor-ApplicationCore.dll!FWindowsApplication::ProcessMessage(HWND__ * hwnd, unsigned int msg, unsigned __int64 wParam, __int64 lParam) Line 1638 C++
UE4Editor-ApplicationCore.dll!FWindowsApplication::AppWndProc(HWND__ * hwnd, unsigned int msg, unsigned __int64 wParam, __int64 lParam) Line 789 C++
[External Code]
[Inline Frame] UE4Editor-ApplicationCore.dll!WinPumpMessages() Line 108 C++
UE4Editor-ApplicationCore.dll!FWindowsPlatformApplicationMisc::PumpMessages(bool bFromMainLoop) Line 130 C++
UE4Editor.exe!FEngineLoop::Tick() Line 4613 C++
[Inline Frame] UE4Editor.exe!EngineTick() Line 62 C++
UE4Editor.exe!GuardedMain(const wchar_t * CmdLine, HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, int nCmdShow) Line 173 C++
UE4Editor.exe!WinMain(HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, char * __formal, int nCmdShow) Line 252 C++

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-90263 in the post.

2
Login to Vote

Won't Fix
ComponentUE - Gameplay - Blueprint
Affects Versions4.24.34.25
CreatedMar 6, 2020
ResolvedJul 19, 2022
UpdatedJul 19, 2022