Show / Hide Table of Contents

Method AddInitialSynchronization

| Edit this page View Source

AddInitialSynchronization(CustomRPC, Func<ZNetPeer, ZPackage>)

Add a CustomRPC and a method for generating a ZPackage to the manager.
The RPC will be initiated on the server side after login to sync arbitrary data to the connecting client. The package is guaranteed to be received before the client's connection is fully established and the player loads into the world.
Declaration
public void AddInitialSynchronization(CustomRPC rpc, Func<ZNetPeer, ZPackage> packageGenerator)
Parameters
Type Name Description
CustomRPC rpc RPC to be called
Func<ZNetPeer, ZPackage> packageGenerator Method generating the ZPackage payload, takes the client peer as its argument
| Edit this page View Source

AddInitialSynchronization(CustomRPC, Func<ZPackage>)

Add a CustomRPC and a method for generating a ZPackage to the manager.
The RPC will be initiated on the server side after login to sync arbitrary data to the connecting client. The package is guaranteed to be received before the client's connection is fully established and the player loads into the world.
Declaration
public void AddInitialSynchronization(CustomRPC rpc, Func<ZPackage> packageGenerator)
Parameters
Type Name Description
CustomRPC rpc RPC to be called
Func<ZPackage> packageGenerator Method generating the ZPackage payload
  • Edit this page
  • View Source
☀
☾
In this article
Back to top
Generated by DocFX
☀
☾