When the order of construction is backwards it makes it impossible to have native objects set up components in OnConstruction, that a child BP Construction Script then has access to. Sometimes the C++ Construction is called before the Blueprints but if you toggle a setting on the BP, such as 'Use Controller Rotation Pitch', the Blueprint is called first.

Attached is a repro project with the steps already setup.

This was reported and tested in 4.22.3 (7053642). This was reproduced in 4.21.2 (CL-4753647), 4.23 (CL-7173969), and Main 4.24 (CL-7174533)

Steps to Reproduce
  1. Open the UE4 Editor and create a C++ project
  2. Create new C++ class, inheriting from APawn
  3. Define OnConstruction for pawn. Put a logging statement inside the implementation (See attached text file
  4. In Editor, create a Blueprint from the custom pawn.
  5. In the Blueprint's Construction Script, add a Print String node
  6. Add an instance of the Blueprint into the Level, observe the Output Log

Results:Child Blueprint Construction Script logging occurs before Parent OnConstruction logging

Expected: Parent OnConstruction logging, followed by child Blueprint Construction Script logging

Have Comments or More Details?

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

Login to Vote

Won't Fix
Affects Versions4.
CreatedJun 25, 2019
ResolvedAug 27, 2021
UpdatedAug 27, 2021