复制
1.引用类型可以复制。(实际传递的是引用对象的ID(FNetworkGUID))
2.大部分组件不支持复制。
1.使用组件的set is replicated时,可以用RepNotify(服务器和客户端执行相同的同步后的事件):
I managed to resolve the issue by getting rid of the Set Is Replicated nodes and making the variable of DeltaRELCombine (the one which is set after calculations and determines where the new StaticMesh should be placed) RepNotify. In the On Rep function I implemented the StaticMeshComponent addition so that it executes both on the client and the server in the same way. I also had to play with the dynamic material instances a bit as they where replicated only upon some significant events.
2.同步static mesh
https://answers.unrealengine.com/questions/21524/replicate-static-mesh.html //利用创建static mesh的actor 解决。
3.变量同步,事件通知
例:
//声明示例
UPROPERTY(Transient, Replicated)
TArray<class AShooterWeapon*> Inventory;