Diarkis Field を使ってリモート・クライアントと同期をする

注: Sync を使用する前に SyncInit を呼び出す必要があります

// This is how to receive remote clients' messages sent by their Sync
field.OnSync += HandleDiarkisFieldSync;

// Sending its current X and Y coordinates along with the Z (It is not height, but Z represents dimension)
// syncLimit controls the maximum number of remote clients to synchronize with
int syncLimit = 30;

// customFilterID executes custom filter function on the server (This is not available for Diarkis Cloud)
int customFilterID = 0;

// message will be sent to all remote clients that are within the field of view
// for UDP, reliable=true will make the message an RUDP packet
bool reliable = false;

field.Sync(x, y, z, syncLimit, customFilterID, message, reliable);

// message is the byte array sent from remote clients
private void HandleDiarkisFieldSync(byte[] message)
  // remoteMessages contains messages of the remote clients within the field of view

NOTE: 負の座標値を持つクライアントは、正の座標値を持つクライアントの視界には重なりません。