Description

The actor Blueprint is intentionally causing an object slice to occur. In other words, we're copying a derived type to a base type, so the expectation is that only the inherited base properties are copied from the derived type.

In this case, that doesn't happen at all. SetStructurePropertyByName seems to be a bit aggressive with checking that UScriptStructs match. Checking that they're from the same hierarchy should be sufficient, but we'll need to validate.

Steps to Reproduce
  1. Download and unzip attached project
  2. Build an run editor
  3. Run MainLevel in PIE
  4. Observe that -1.0 is printed to the HUD
  5. Expected behavior: 10.0 is printed to the HUD

Have Comments or More Details?

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

0
Login to Vote

Fixed
ComponentUE - Gameplay - Blueprint
Target Fix5.5
Fix Commit33460108
CreatedFeb 19, 2024
ResolvedMay 6, 2024
UpdatedMay 20, 2024
View Jira Issue