public static void WriteToMessage(NetObject obj, NetOutgoingMessage message) { message.Write((byte)obj.Type); obj.Write(message); }