public void Server_SetCollectionContentsOnClient(SetCollectionContentsMessage data) { var col = GetServerCollection(data.collectionGuid); if (col != null) { // TODO: Sync the size of the collection and type as well // col.collectionName = data.collectionName; // col.collectionCount = (ushort)data.items.Length; logger.LogVerbose($"[Server] Set client's collection contents ({data.items.Length} items) with name {data.collectionName} and guid {col.ID} for client {netId}", this); TargetRpc_SetCollectionContents(connectionToClient, data); } else { logger.Warning($"Collection with guid {data.collectionGuid} is not known to server. Make sure to add the collection before setting state!", this); } }
protected void TargetRpc_SetCollectionContents(NetworkConnection target, SetCollectionContentsMessage data) { collectionReplicator.TargetRpc_SetCollectionContents(target, data); }