Description

When a component class (base) contains a component property (Nested) adding the base component to a blueprint and changing the position of the component will update the base and nested components as expected.

However, when a child of the blueprint is created an ensure is triggered upon opening.
Additionally, the child blueprint will show the nested component at the origin regardless of where the base component position is.

For example, if the base component (code class with component property) is placed at (-100, -100, -100) in the parent blueprint, the nested component in the parent will also be at that location - but if a child of the blueprint is created, the base component will still be at the location set in the parent blueprint, but the nested component in the child is at (0, 0, 0)

Regression:
No - Same behavior occurs in 4.16.3 (CL 3561208)

Steps to Reproduce
  1. Open UE4 Editor (any project)
  2. Add code to project based on Scene Component (MySceneComp)
  3. Add the following to MySceneComp.h
    UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = test)
    	UStaticMeshComponent* MyMesh;
    
  4. Add the following to MySceneComp.cpp in the constructor
    MyMesh = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("MyMesh"));
    MyMesh->SetupAttachment(this);
    
  5. Compile
  6. In the editor, create a blueprint based on actor (Parent)
  7. Add MySceneComp to component hierarchy
  8. In the details panel of MySceneComp, set Test->MyMesh->StaticMesh (for visual representation)
  9. Reposition MySceneComp so that it is not at the blueprint's origin
  10. Compile/Save the blueprint
  11. Create a child blueprint of Parent (Child)
  12. Open Child

Result:
Ensure occurs when Child blueprint is opened. MyMesh component of MySceneComp is located at the origin in Child

Expected:
Editor does not trigger ensure when blueprint is opened and MyMesh is in the same location in Child blueprint as it is in Parent blueprint

Callstack
Ensure condition failed: false [File:D:\Build\++UE4+Release-4.17+Compile\Sync\Engine\Source\Runtime\Engine\Private\Components\SceneComponent.cpp] [Line: 1740]
Template Mismatch during attachment. Attaching instanced component to template component. Parent 'MyScene_GEN_VARIABLE' Self 'MyMesh'

UE4Editor-Core.dll!FWindowsPlatformStackWalk::StackWalkAndDump() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\core\private\windows\windowsplatformstackwalk.cpp:200]
UE4Editor-Core.dll!FDebug::EnsureFailed() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\core\private\misc\assertionmacros.cpp:233]
UE4Editor-Core.dll!FDebug::OptionallyLogFormattedEnsureMessageReturningFalse() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\core\private\misc\assertionmacros.cpp:360]
UE4Editor-Engine.dll!USceneComponent::AttachToComponent() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\engine\private\components\scenecomponent.cpp:1740]
UE4Editor-Engine.dll!USceneComponent::OnRegister() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\engine\private\components\scenecomponent.cpp:570]
UE4Editor-Engine.dll!UPrimitiveComponent::OnRegister() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\engine\private\components\primitivecomponent.cpp:465]
UE4Editor-Engine.dll!UActorComponent::ExecuteRegisterEvents() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\engine\private\components\actorcomponent.cpp:1236]
UE4Editor-Engine.dll!UActorComponent::RegisterComponentWithWorld() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\engine\private\components\actorcomponent.cpp:974]
UE4Editor-Engine.dll!UActorComponent::RegisterComponentWithWorld() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\engine\private\components\actorcomponent.cpp:1011]
UE4Editor-Engine.dll!UActorComponent::RegisterComponent() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\engine\private\components\actorcomponent.cpp:1028]
UE4Editor-Engine.dll!USimpleConstructionScript::RegisterInstancedComponent() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\engine\private\simpleconstructionscript.cpp:598]
UE4Editor-Engine.dll!USCS_Node::ExecuteNodeOnActor() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\engine\private\scs_node.cpp:157]
UE4Editor-Engine.dll!USCS_Node::ExecuteNodeOnActor() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\engine\private\scs_node.cpp:187]
UE4Editor-Engine.dll!USimpleConstructionScript::ExecuteScriptOnActor() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\engine\private\simpleconstructionscript.cpp:609]
UE4Editor-Engine.dll!AActor::ExecuteConstruction() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\engine\private\actorconstruction.cpp:725]
UE4Editor-Engine.dll!AActor::RerunConstructionScripts() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\engine\private\actorconstruction.cpp:494]
UE4Editor-Kismet.dll!FBlueprintEditor::UpdatePreviewActor() [d:\build\++ue4+release-4.17+compile\sync\engine\source\editor\kismet\private\blueprinteditor.cpp:8263]
UE4Editor-Kismet.dll!FSCSEditorViewportClient::InvalidatePreview() [d:\build\++ue4+release-4.17+compile\sync\engine\source\editor\kismet\private\scseditorviewportclient.cpp:744]
UE4Editor-Kismet.dll!SSCSEditorViewport::DeferredUpdatePreview() [d:\build\++ue4+release-4.17+compile\sync\engine\source\editor\kismet\private\sscseditorviewport.cpp:498]
UE4Editor-Kismet.dll!TBaseSPMethodDelegateInstance<0,SSCSEditorViewport,0,enum EActiveTimerReturnType __cdecl(double,float),bool>::Execute() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\core\public\delegates\delegateinstancesimpl.h:327]
UE4Editor-SlateCore.dll!FActiveTimerHandle::ExecuteIfPending() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slatecore\private\application\activetimerhandle.cpp:48]
UE4Editor-SlateCore.dll!SWidget::ExecuteActiveTimers() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slatecore\private\widgets\swidget.cpp:978]
UE4Editor-SlateCore.dll!SWidget::Paint() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slatecore\private\widgets\swidget.cpp:855]
UE4Editor-SlateCore.dll!SCompoundWidget::OnPaint() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slatecore\private\widgets\scompoundwidget.cpp:35]
UE4Editor-Slate.dll!SBorder::OnPaint() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slate\private\widgets\layout\sborder.cpp:85]
UE4Editor-SlateCore.dll!SWidget::Paint() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slatecore\private\widgets\swidget.cpp:885]
UE4Editor-SlateCore.dll!SOverlay::OnPaint() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slatecore\private\widgets\soverlay.cpp:97]
UE4Editor-SlateCore.dll!SWidget::Paint() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slatecore\private\widgets\swidget.cpp:885]
UE4Editor-SlateCore.dll!SPanel::PaintArrangedChildren() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slatecore\private\widgets\spanel.cpp:31]
UE4Editor-SlateCore.dll!SPanel::OnPaint() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slatecore\private\widgets\spanel.cpp:12]
UE4Editor-SlateCore.dll!SWidget::Paint() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slatecore\private\widgets\swidget.cpp:885]
UE4Editor-SlateCore.dll!SCompoundWidget::OnPaint() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slatecore\private\widgets\scompoundwidget.cpp:35]
UE4Editor-SlateCore.dll!SWidget::Paint() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slatecore\private\widgets\swidget.cpp:885]
UE4Editor-SlateCore.dll!SPanel::PaintArrangedChildren() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slatecore\private\widgets\spanel.cpp:31]
UE4Editor-Slate.dll!SSplitter::OnPaint() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slate\private\widgets\layout\ssplitter.cpp:167]
UE4Editor-SlateCore.dll!SWidget::Paint() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slatecore\private\widgets\swidget.cpp:885]
UE4Editor-SlateCore.dll!SCompoundWidget::OnPaint() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slatecore\private\widgets\scompoundwidget.cpp:35]
UE4Editor-SlateCore.dll!SWidget::Paint() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slatecore\private\widgets\swidget.cpp:885]
UE4Editor-SlateCore.dll!SPanel::PaintArrangedChildren() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slatecore\private\widgets\spanel.cpp:31]
UE4Editor-Slate.dll!SSplitter::OnPaint() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slate\private\widgets\layout\ssplitter.cpp:167]
UE4Editor-SlateCore.dll!SWidget::Paint() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slatecore\private\widgets\swidget.cpp:885]
UE4Editor-SlateCore.dll!SOverlay::OnPaint() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slatecore\private\widgets\soverlay.cpp:97]
UE4Editor-SlateCore.dll!SWidget::Paint() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slatecore\private\widgets\swidget.cpp:885]
UE4Editor-SlateCore.dll!SCompoundWidget::OnPaint() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slatecore\private\widgets\scompoundwidget.cpp:35]
UE4Editor-SlateCore.dll!SWidget::Paint() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slatecore\private\widgets\swidget.cpp:885]
UE4Editor-SlateCore.dll!SPanel::PaintArrangedChildren() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slatecore\private\widgets\spanel.cpp:31]
UE4Editor-SlateCore.dll!SPanel::OnPaint() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slatecore\private\widgets\spanel.cpp:12]
UE4Editor-SlateCore.dll!SWidget::Paint() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slatecore\private\widgets\swidget.cpp:885]
UE4Editor-SlateCore.dll!SCompoundWidget::OnPaint() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slatecore\private\widgets\scompoundwidget.cpp:35]
UE4Editor-SlateCore.dll!SWidget::Paint() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slatecore\private\widgets\swidget.cpp:885]
UE4Editor-SlateCore.dll!SCompoundWidget::OnPaint() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slatecore\private\widgets\scompoundwidget.cpp:35]
UE4Editor-Slate.dll!SBorder::OnPaint() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slate\private\widgets\layout\sborder.cpp:85]
UE4Editor-SlateCore.dll!SWidget::Paint() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slatecore\private\widgets\swidget.cpp:885]
UE4Editor-SlateCore.dll!SOverlay::OnPaint() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slatecore\private\widgets\soverlay.cpp:97]
UE4Editor-SlateCore.dll!SWidget::Paint() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slatecore\private\widgets\swidget.cpp:885]
UE4Editor-SlateCore.dll!SPanel::PaintArrangedChildren() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slatecore\private\widgets\spanel.cpp:31]
UE4Editor-SlateCore.dll!SPanel::OnPaint() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slatecore\private\widgets\spanel.cpp:12]
UE4Editor-SlateCore.dll!SWidget::Paint() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slatecore\private\widgets\swidget.cpp:885]
UE4Editor-SlateCore.dll!SCompoundWidget::OnPaint() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slatecore\private\widgets\scompoundwidget.cpp:35]
UE4Editor-SlateCore.dll!SWidget::Paint() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slatecore\private\widgets\swidget.cpp:885]
UE4Editor-SlateCore.dll!SPanel::PaintArrangedChildren() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slatecore\private\widgets\spanel.cpp:31]
UE4Editor-Slate.dll!SSplitter::OnPaint() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slate\private\widgets\layout\ssplitter.cpp:167]
UE4Editor-SlateCore.dll!SWidget::Paint() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slatecore\private\widgets\swidget.cpp:885]
UE4Editor-SlateCore.dll!SOverlay::OnPaint() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slatecore\private\widgets\soverlay.cpp:97]
UE4Editor-SlateCore.dll!SWidget::Paint() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slatecore\private\widgets\swidget.cpp:885]
UE4Editor-SlateCore.dll!SCompoundWidget::OnPaint() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slatecore\private\widgets\scompoundwidget.cpp:35]
UE4Editor-SlateCore.dll!SWidget::Paint() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slatecore\private\widgets\swidget.cpp:885]
UE4Editor-SlateCore.dll!SPanel::PaintArrangedChildren() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slatecore\private\widgets\spanel.cpp:31]
UE4Editor-SlateCore.dll!SPanel::OnPaint() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slatecore\private\widgets\spanel.cpp:12]
UE4Editor-SlateCore.dll!SWidget::Paint() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slatecore\private\widgets\swidget.cpp:885]
UE4Editor-SlateCore.dll!SPanel::PaintArrangedChildren() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slatecore\private\widgets\spanel.cpp:31]
UE4Editor-SlateCore.dll!SPanel::OnPaint() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slatecore\private\widgets\spanel.cpp:12]
UE4Editor-SlateCore.dll!SWidget::Paint() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slatecore\private\widgets\swidget.cpp:885]
UE4Editor-SlateCore.dll!SOverlay::OnPaint() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slatecore\private\widgets\soverlay.cpp:97]
UE4Editor-SlateCore.dll!SWidget::Paint() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slatecore\private\widgets\swidget.cpp:885]
UE4Editor-SlateCore.dll!SCompoundWidget::OnPaint() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slatecore\private\widgets\scompoundwidget.cpp:35]
UE4Editor-SlateCore.dll!SWindow::OnPaint() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slatecore\private\widgets\swindow.cpp:1845]
UE4Editor-SlateCore.dll!SWidget::Paint() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slatecore\private\widgets\swidget.cpp:885]
UE4Editor-Slate.dll!FSlateApplication::DrawWindowAndChildren() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:1231]
UE4Editor-Slate.dll!FSlateApplication::DrawWindowAndChildren() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:1320]
UE4Editor-Slate.dll!FSlateApplication::PrivateDrawWindows() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:1471]
UE4Editor-Slate.dll!FSlateApplication::DrawWindows() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:1188]
UE4Editor-Slate.dll!FSlateApplication::TickApplication() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:1773]
UE4Editor-Slate.dll!FSlateApplication::Tick() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:1591]
UE4Editor.exe!FEngineLoop::Tick() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\launch\private\launchengineloop.cpp:3278]
UE4Editor.exe!GuardedMain() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\launch\private\launch.cpp:166]
UE4Editor.exe!GuardedMainWrapper() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:134]
UE4Editor.exe!WinMain() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:210]
UE4Editor.exe!__scrt_common_main_seh() [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:253]
kernel32.dll!0x00000000773459CD
ntdll.dll!0x000000007757A561

Have Comments or More Details?

Head over to the existing Questions & Answers thread and let us know what's up.

7
Login to Vote

Won't Fix
ComponentUE - Gameplay - Blueprint
Affects Versions4.16.34.17.1
CreatedAug 25, 2017
ResolvedAug 18, 2021
UpdatedAug 18, 2021