public override void Serialize()
 {
     BufferedNetworkUtilsServer.SendInt(_clusterCommandWatingList.Count);//total number of cluster Commands
     try
     {
         foreach (ClusterCommand e in _clusterCommandWatingList)
         {
             e.SerializeParameterData();
             e.SerializeGenericData();
         }
         ClusterCommandStatisticClass.instance.RefreshData();
         FduClusterCommandDispatcher.NotifyDispatch();
     }
     catch (InvalidSendableDataException e)
     {
         Debug.LogError(e.Message);
     }
     finally
     {
         clearClusterCommands();
     }
 }
        public override NetworkState.NETWORK_STATE_TYPE Deserialize()
        {
            NetworkState.NETWORK_STATE_TYPE state = NetworkState.NETWORK_STATE_TYPE.SUCCESS;
            clearClusterCommands();
            int CommandCount = BufferedNetworkUtilsClient.ReadInt(ref state); //total number of cluster Commands

            try
            {
                for (int i = 0; i < CommandCount; ++i)
                {
                    ClusterCommand newCommand = new ClusterCommand("1");
                    newCommand.DeserializeParameterData(ref state);
                    newCommand.DeserializeGenericData(ref state);
                    _clusterCommandWatingList.Add(newCommand);
                }
                ClusterCommandStatisticClass.instance.RefreshData();
                FduClusterCommandDispatcher.NotifyDispatch();
            }
            catch (InvalidSendableDataException e)
            {
                Debug.LogError(e.Message);
            }
            return(state);
        }