Steps to Reproduce report from:

Lucy Ainsworth

Issue: Blueprints with harvested static mesh components, once placed in the map, are unable to have their collision profile modified.

Repro Steps:

1) Place some basic primitives in a map

2) Select those primitives, Blueprint ToolBar Button -> Convert selection to Blueprint Class

3) Select Harvest Components, then Green button 'Select'

4) Select an inherited SMC within the newly placed BP instance

5) Attempt to Change Collision Presets from Default to Anything non-custom.


It always results in being assigned to BlockAll, and the user selection from the drop down is ignored. This appears to be caused by FBodyInstanceCustomization::MarkAllBodiesDefaultCollision, specifically the fact that calling NotifyPostChange will trigger a re-execution of construction scripts for this actor causing SetValue to fail silently because the SMC has been trashed (due to another bug in FPropertyValueImpl::SetValueAsString where the return value from ImportText is just ignored).

Proposed Fixes:

1) FPropertyValueImpl::SetValueAsString - Actually use the return value from ImportText to inform the results of this operation instead of tossing the return value

2) FBodyInstanceCustomization::MarkAllBodiesDefaultCollision - Take in a secondary parameter to control the pre/post notifications, defaulting to enabled. In OnCollisionProfileChanged, pass false as the secondary param on line 878 to prevent the construction scripts from running before we call SetValue.

3) FBodyInstanceCustomization::OnCollisionProfileChanged - Update the last part of this function to mimic the same flow as the first part: MarkAllBodiesDefaultCollision -> SetValue -> UpdateCollisionProfile. Right now there are 2 separate code flows within this 1 method for updating the target collision profile name for Specific vs Custom & it would be good to unify these code paths for consistency & clarity.

Have Comments or More Details?

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

Login to Vote

Won't Fix
ComponentUE - Simulation - Physics
Affects Versions4.25
CreatedSep 16, 2020
ResolvedJul 19, 2022
UpdatedJul 19, 2022