public static void DistributeIDComponentUpdate(IDComponent sender,IDComponentUpdateMsg msg) { msg.id = sender.getID(); msg.componentName = sender.GetType ().ToString (); if (instance.mode) NetworkServer.SendToAll (MyMsgType.IDComponentUpdateMessage, msg); else { client.Send(MyMsgType.IDComponentUpdateMessage,msg); } }