Closed indiest closed 6 months ago
Currently object is replicated using UnrealObjectRef
, but only dynamic object is supported.
Static Class or resources also need to be supported, for example TSubclassOf
in function void ClientSetHUD(TSubclassOf<AHUD> NewHUDClass)
or UStaticMesh
in https://github.com/metaworking/channeld-ue-plugin/issues/32.
A global map for all static objects seems a possible solution.
With the StaticGuidRegistery in v0.7.3, the UnrealObjectRef won't have to be fully exported in most cases.
UnrealObjetRef
carries a NetworkGUID to reference an UObject between UE clients and servers. A Fully Exported UnrealObjectRef (FER) also contains the outer object chain and serialized bunch, in order to spawn the actor. Depending on the length of the outer object chain, the size of a serialized UnrealObjectRef varies from 100 to 300 bytes.FERs exists in both spatial and entity channel data. Whenever a connection subscribes to an entity channel, or a handover happens, FERs are sent to the interested sides, and the network traffic overhead is considerable.
To improve the network traffic, ChanneldUE should have its own framework to replace UE's
SerializeNewActor
. TheclassPath
field was an attempt, but it doesn't work in some scenarios. An ideal solution would be building a type map and maintain the map distributedly. In that way, only the type key is need in theUnrealObjetRef
to spawn actors in most cases.