When UPrimitiveComponent::CreateDynamicMaterialInstance is called on a skinned mesh, and the input material is invalid, we call USkinnedMeshComponent::GetMaterial to get the base material on the existing mesh. The problem is that, during actor reconstruction, the mesh that GetMaterial retrieves is always going to be the base mesh, not any overridden mesh that a user has set in the level viewport.
This is a general issue with trying to get an overridden mesh during actor construction, the component will always return the value on the class archetype. Using SkeletalMeshComponentInstanceData to cache the mesh asset value is not the right way to fix this as that causes other serialization bugs ([Link Removed])
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-243870 in the post.
0 |
Component | UE - Rendering Architecture |
---|
Created | Feb 6, 2025 |
---|---|
Updated | Feb 14, 2025 |