How To Initialize The Client On The Server
In order to start with the Field module server, you must “initialize” the client.
// We receive a response from the server once the client is successfully initialized on the server field.OnResponseSyncInit += HandleDiarkisFieldInit;
// Initialize the client by 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 field.SyncInit(x, y, z, syncLimit, customFilterID, message);
// The event is raised when the client is successfully initialized on the server by SyncInit private void HandleDiarkisFieldInit(List<byte[]> remoteMessages) { // remoteMessages contains messages of the remote clients within the field of view }
|