The component's KnownStaticMesh value is updated whenever UStaticMeshComponent::UpdateBounds is called, and AActor::OnRep_ReplicatedMovement can result in this being called for the component. If this happens before UStaticMeshComponent::OnRep_StaticMesh is called, when that function sets StaticMesh to its old value and calls SetStaticMesh with the new replicated value, it will result in KnownStaticMesh not matching StaticMesh, triggering the ensure.
See linked UDN for relevant callstacks and more info.
Create an actor with a replicated StaticMeshComponent as its root component. The actor should be set to replicate and to replicate movement, and the static mesh component should be set to replicate as well.
When this actor is initialized (such as in its BeginPlay), set the component's StaticMesh and change its relative location.
In multiplayer PIE, spawn this actor on the server, so it can be replicated to the client.
Result: the ensure in UStaticMeshComponent::OutdatedKnownStaticMeshDetected will be triggered.
See linked UDN for more info.
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-156362 in the post.
3 |
Component | UE - Networking |
---|---|
Affects Versions | 5.0 |
Created | Jun 10, 2022 |
---|---|
Updated | Sep 9, 2022 |
9456 - cmsinflexion |