I started my project with a Blueprint-heavy inheritance hierarchy and eventually moved many of the base classes to C++. However, when reparenting the Blueprint classes to the C+±backed classes, the inherited components defined in C++ do not show anything in their Details panel in the Blueprint subclass.
Reproduction steps:
-
Create a BP-only inheritance tree. For example:
MyClass_BP
├── MyChild0_BP
| └── MyChild0_Child0_BP
└── MyChild1_BP -
Add some ActorComponents to
MyClass_BP
and notice they show up correctly in theMyChild
subclasses. Add some script references to the inherited actors and notice they behave as expected. -
Create a C++ class, we’ll call it
AMyClass
UCLASS(Blueprintable, BlueprintType)
class AMyClass : public AActor
{
GENERATED_BODY()UPROPERTY(BlueprintReadWrite, Category="Components", EditAnywhere) UCameraComponent* CameraComponent;
}
-
Reparent
MyClass_BP
to inherit fromAMyClass
. -
Open
MyClass_BP
and select the inherited CameraComponent -
Notice the CameraComponent’s Details inspector is empty or is missing properties for the component.
-
Notice that the scripts that consume the CameraComponent see it as “None”
Expected Results:
Components inherited from C++ classes and properly constructed using CreateDefaultSubobject
in the C++ class’s constructor should display their Details, should not be None in scripts, and should behave exactly the same as other components when reparenting BP classes.
Actual Results:
Inherited components that come from a C++ base do not show their Details in the inspector window and are None in scripts after reparenting an existing BP class to the C++ base.
Reproducibility:
Even after recompiles, restarts, and other tactics to clear build data, this issue persists. This appears to be a common issue, but is not consistent.
Severity:
Severe. Anyone attempting to refactor their project to take advantage of a C++ base class will have their entire BP hierarchy DESTROYED by this bug.