Description

If a custom component creates another component in code, the second component does not appear in the hierarchy inside the blueprint menu. It does appear in the hierarchy for an instanced version of the blueprint already placed in the level.

Steps to Reproduce
  1. Open UE4Editor (code based project)
  2. Add code to project based on Scene Component (MySceneComponent)
  3. In the header file, add the following:
    UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = test)
    UStaticMeshComponent* MyMesh;
    
  4. In the source file, add the following to the constructor:
    MyMesh = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("MyMesh"));
    
  5. Compile
  6. Create a new blueprint based on Actor (MyActorBP)
  7. Drag instance of MyActorBP into the level
  8. In BP editor use Add Component button to add My Scene component

Result:
MyScene shows up in BP editor but MyMesh does not.

Expected:
MyMesh does show up in hierarchy (like it does for instanced blueprint in the level).

Have Comments or More Details?

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

22
Login to Vote

Won't Fix
ComponentUE - Gameplay - Blueprint
Affects Versions4.7.14.7.64.84.144.204.23
CreatedMay 8, 2015
ResolvedAug 18, 2021
UpdatedAug 18, 2021
View Jira Issue