Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/UNetDriver
Description
Explicitly generates and assigns a new network ID (FNetRefHandle if using Iris, FNetworkGUID if using generic replication) to Object and returns it. This can be used in combination with AssignNetIDToObject to associate actor instances that are spawned manually for replication, as opposed to the default behavior of letting the engine spawn the client's instance of a replicated actor automatically. This function would typically be called on a server, and the caller is responsible for communicating the returned ID to the remote/client side and calling AssignNetIDToObject to associate the ID with the client instance of the object. Only actors or Iris root objects are supported.
| Name | CreateNetIDForObject |
| Type | function |
| Header File | /Engine/Source/Runtime/Engine/Classes/Engine/NetDriver.h |
| Include Path | #include "Engine/NetDriver.h" |
| Source | /Engine/Source/Runtime/Engine/Private/NetDriver.cpp |
UE::Net::FNetIDVariant CreateNetIDForObject
(
UObject * Object
)