com.unity.netcode.gameobjects icon indicating copy to clipboard operation
com.unity.netcode.gameobjects copied to clipboard

AutoObjectParentSync may fail if turned off and back on again because of m_CachedParent

Open zachstronaut opened this issue 4 months ago • 1 comments

Description

If you turn AutoObjectParentSync off and do some re-parenting and then turn it back on and do some re-parenting, the auto re-parenting will not send if m_CachedParent happens to have been previously set to the new parent you are targeting.

m_CachedParent maybe should be set to the current parent when AutoObjectParentSync goes from false to true.

This could also be a feature request / something for the docs I suppose.

Environment

OS: Windows 11 Unity Version: 6000.1.3f1 Netcode Version: 2.4.2 Netcode Topology: Client-Server

zachstronaut avatar Jul 31 '25 23:07 zachstronaut

@zachstronaut Nice catch...that doesn't seem like a feature...it seems like an edge case I missed. I will mark this for triage. 👍

Internal Note: This fix could be paired with #3559 - MTTB-1479.

NoelStephensUnity avatar Aug 04 '25 14:08 NoelStephensUnity