Method AddInitialSynchronization
| Improve this Doc View SourceAddInitialSynchronization(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.
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 |
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.
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 |