NetWorkIDs
March 29, 2022Less than 1 minute
NetWorkIDs
FUniqueNetID vs FNetworkGUID vs PlayerId
GetUniqueID()
这个是UObject的唯一ID,只有object是激活的。但是它并不是一样数值存在于服务器和客户端。
FNetworkGUID
这个是服务器和客户端统一的一个UObject的唯一ID。它是存在 UNetDriver 里的FNetGUICache中的。我们可以这样获取:
FNetworkGUID networkID = GetWorld()->GetNetDriver()->GuidCache->GetNetGUID(GetOwner());;
APlayerState.PlayerId
APlayerState.UniqueID
Reference From https://udn.unrealengine.com/questions/232509/about-testing-multiplayer.html