diff --git a/Gems/Multiplayer/Code/Source/Components/NetworkHierarchyRootComponent.cpp b/Gems/Multiplayer/Code/Source/Components/NetworkHierarchyRootComponent.cpp index 89db2180a5..d62b103702 100644 --- a/Gems/Multiplayer/Code/Source/Components/NetworkHierarchyRootComponent.cpp +++ b/Gems/Multiplayer/Code/Source/Components/NetworkHierarchyRootComponent.cpp @@ -408,12 +408,16 @@ namespace Multiplayer if (auto* networkInput = input.FindComponentInput()) { + INetworkEntityManager* networkEntityManager = AZ::Interface::Get(); + AZ_Assert(networkEntityManager, "NetworkEntityManager must be created."); + for (NetworkInputChild& subInput : networkInput->m_childInputs) { - const ConstNetworkEntityHandle& childEntity = subInput.GetOwner(); - if (auto* localChild = childEntity.GetEntity()) + const ConstNetworkEntityHandle& childEntityFromInput = subInput.GetOwner(); + ConstNetworkEntityHandle localChildHandle = networkEntityManager->GetEntity(childEntityFromInput.GetNetEntityId()); + if (localChildHandle.Exists()) { - auto* netComp = childEntity.GetNetBindComponent(); + auto* netComp = localChildHandle.GetNetBindComponent(); AZ_Assert(netComp, "No NetBindComponent, this should be impossible"); // We do not rewind entity role changes, so make sure we are the correct role prior to processing if (netComp->HasController())