Attaching a StaticMeshComponent to A SceneComponent
I am trying to to achieve the following hierarchy:
Pawn -> StaticMeshComponent (Root Component) -> SceneComponent A -> StaticMeshComponent B
In other words: My pawn has a mesh-representation, and my scene component A also has one with B. I use the following code to achieve this in the SceneComponent A:
Where UstaticMeshComponent* mesh ist the pointer for B. I initialize it in the constructor:
This is the result:
Both A and B are children of the RootComponent, not B child of A. I can edit the mesh of B through A (were B is accessible and editable), but not its material. When I select it I cant change its properties, because the engine says it is inhereted and must be declarde with Uproperty (which I did). It does not render in editor, but when I hit play it does. When I hover over it, it says "Introduced in: Unknown native source (via C++ code)" which makes absolutely no sense to me.
So I would like to know how to fix this and if my approach to giving both A and the pawn a mesh is right (I didnt find a way to include the mesh in the A itsself)
I have tried this in 4.10.4 and 4.12.3
Thank you for your help!
answered Jan 24 '17 at 01:57 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here