x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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.

Product Version: UE 4.11
Tags:
more ▼

asked Apr 16 '16 at 06:36 PM in Bug Reports

avatar image

zimmed
1 2 3

avatar image eagletree Apr 17 '16 at 02:19 PM

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.

avatar image Doug E ♦♦ STAFF Apr 19 '16 at 05:25 PM

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

Doug Wilson

avatar image zimmed Apr 19 '16 at 08:19 PM

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

Dave

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

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

Doug Wilson

more ▼

answered Apr 25 '16 at 06:24 PM

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question