Child StaticMesh of Inherited Scene Not Rendering On Actor

I have been pulling my hair out for hours now trying to figure out why in the world this isn’t working.

Setup

I have an AActor class in C++ MyActor that creates a StaticMeshComponent as the root, as well as a SceneComponent that is a child of the root. Next, I have a BP class BP_MyActor that inherits from MyActor. The purpose was to have a scene inside the actor on which I can toggle the visibility, but design the scene within the BP editor.

In BP_MyActor I was able to add a mesh to the root StaticMesh, and even add other StaticMesh and Scene components that all rendered on the instances without an issue.

BP_MyActor Component Structure (NOT CODE):

 Mesh:StaticMesh (Inherited) // Root component, works fine
    AThing:StaticMesh // Fine
    AScene:Scene // Fine
        AnotherThing:StaticMesh // Fine
    TheScene:Scene (Inherited) // Source of problem

Problem

When I moved a child StaticMeshComponents into the inherited SceneComponent, the mesh no longer rendered on the instance. I could see it in the View tab of the BP_MyActor editor, but nothing would render on an instance when I dragged it into my level. But if I created a new SceneComponent in BP_MyActor that has all the same properties as the inherited SceneComponent and dragged the same StaticMeshComponents into that, they rendered fine.

BP_MyActor Component Structure:

 Mesh:StaticMesh (Inherited)
    AScene:Scene // Fine
    TheScene:Scene (Inherited) // Source of problem
        AnotherThing:StaticMesh // Will not render when here
        AThing:StaticMesh // Also won't render

 Mesh:StaticMesh (Inherited)
    AScene:Scene // Fine
        AnotherThing:StaticMesh // Renders fine when here
        AThing:StaticMesh // Also fine
    TheScene:Scene (Inherited) // Source of problem

I can’t imagine this being intended behavior, and have exhausted about every option trying to figure it out. I’m left with one conclusion – it must be a bug.

Details

I’ve tried building, recompiling, deleting cache / regenerating source / rebuilding from source, restarting the editor, restarting the computer. No luck.

Using UE 4.11.1 on Windows 8.1 x64.
Haven’t had any other major issues, and have been working on this project for weeks now.

If anyone can look into this and let me know if it’s solvable without waiting for an engine update, it’d be greatly appreciated. Or even better, if it’s not a bug, letting me know wtf I’m doing wrong. Thanks.

I doubt this is your problem, but I will relate a similar problem I had just in case. I parented the weapon to a player and sub-components (barrel, stock etc) of the weapon would not render. It was that I had a default component at root of one of the blueprints involved. It was easily fixed by moving the components up one level in the hierarchy of the offending blueprint, thus establishing a real root. Seemed like a bug, but easy to fix.

Hey zimmed-

Can you elaborate on your setup for clarification? I created a new class based on actor and added a new static mesh component and scene component

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Test)
	UStaticMeshComponent* StaticMeshComp;
	
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Test)
	USceneComponent* SceneComp;

I then created each component in the constructor:

StaticMeshComp = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("StaticMeshComp"));
	RootComponent = StaticMeshComp;

SceneComp = CreateDefaultSubobject<USceneComponent>(TEXT("SceneComp"));
	SceneComp->AttachTo(RootComponent);

From here I created a blueprint based on this class. I then added a static mesh component to the blueprint and set the component as a child SceneComp. I set the mesh of the child static mesh component and when I pulled an instance of the blueprint into the level I could see the static mesh that was set.

Can you post your code and blueprint setup as well as any other information that could help me reproduce this issue locally.

Cheers

Hi . Thanks for the response. I’ll take a look again when I get back from work and let you know.

Dave

Hey zimmed-

I wanted to ask if you’ve had a chance to check the code I provided. In the mean time I am going to mark this post as resolved for tracking purposes. If you are still having this issue, can you post a screenshot or a short video to show an example of what you’re seeing and we will continue investigating.

Cheers