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.