Description

PostLoad function is not called for blueprint components added through code.

Regression: Yes

In 4.12.5 (CL 3039270) code components do have PostLoad called if other components are not added through the editor
in 4.13.2 (CL 3172292) code components do not have PostLoad called in any circumstance.

Steps to Reproduce
  1. Open UE4 Editor (any project)
  2. Add code to project based on Actor (MyActor)
  3. Add the following to MyActor.h
    UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Test)
    	UStaticMeshComponent* MyMesh;
    
  4. Add the followind to MyActor.cpp constructor
    MyMesh = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("MyMesh"));
    	RootComponent = MyMesh;
    
  5. Compile
  6. Add two blueprints based on MyActor (Positive and Negative)
  7. Open Negative blueprint and add Scene component
  8. Save and close the editor
  9. Launch the editor through Visual studio
  10. Place Breakpoint in UStaticMeshComponent::PostLoad() function
  11. Double click Positive to open blueprint
  12. Double Click Negative to open blueprint

Result:
In 4.12, opening Positive will trigger breakpoint but opening Negative does not. In 4.13 and 4.14, nether Positive nor Negative trigger breakpoint

Expected:
PostLoad is called for all components regardless of the other components in a blueprint.

Have Comments or More Details?

There's no existing public thread on this issue, so head over toAnswerHub just mention UE-38234 in the post.

0
Login to Vote

Fixed
ComponentGameplay - Components
Affects Versions4.12.54.13.24.14
Target Fix4.17
Fix Commit3396712
Main Commit3431398
CreatedNov 3, 2016
ResolvedApr 17, 2017
UpdatedMay 12, 2017