Why does client scene component attach to owner's root?

Hi there,

As in the question, the code in USceneComponent::PostNetReceive attaches a scene component to it’s owners root if it doesn’t already have a parent.

Why does it do this?

This breaks the case where the server has a replicated scene component without a parent as the client will just try reattach to it’s owners parent on every net receive.

Thanks

This is really old code that I think is making an assumption that if the replicated scene component doesn’t have a resolved AttachParent, then it’s because the component is attached to a non-net-addressable component on the server, and should at least attach to its paren’s root component.

I think you would be fine to remove it locally. I’ll see if we can remove it from the next engine release.

I see, thanks for the response.