Description

Dynamically-spawned instances of a Blueprint class go through an optimized property initialization pass (see UBlueprintGeneratedClass::BuildCustomPropertyListForPostConstruction() and InitPropertiesFromCustomList()). This code path does not properly account for native struct-typed values that either (a) specify their own Identical()/Copy() functions, or (b) do not declare any UPROPERTY() fields. FDateTime is one example of (b) that we currently have in engine code, which also includes a property type customization that allows the default value to be modified. As a result, the struct value in the spawned instance will not currently receive the modified value from the Blueprint CDO.

Steps to Reproduce
  1. Open the attached project in UE4 (note - it was created in 4.24).
  2. Double-click the MyActorBP asset to open it in the Blueprint editor. Choose "Class Defaults" and note that the DateTime value is set to "0002.02.02" (i.e. it has been changed from the default value of "0001.01.01").
  3. PIE, and note that '1' is displayed in the console output.
    Expected result: '2' is displayed (the modified "Day" value of the date in MyActorBP).
Callstack

N/A

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-88643 in the post.

0
Login to Vote

Fixed
ComponentUE - Gameplay - Blueprint
Affects Versions4.224.234.24
Target Fix4.25
Fix Commit11687191
Main Commit11428153
Release Commit11687191
CreatedFeb 12, 2020
ResolvedFeb 27, 2020
UpdatedJan 26, 2021