Ребятки подскажите пожалуйста есть на кнопке скрипт c#:
if(GUI.Button(new Rect(Screen.width / 2 - 264, Screen.height / 2 + 150, 529, 62), "Отправить"))
{
MailAddress email1 = new MailAddress ("Что", "От кого");
MailAddress email2 = new MailAddress ("На какой e-mail", "Кому");
using (MailMessage MailMessages = new MailMessage (email1, email2))
using (SmtpClient smtpClient = new SmtpClient ())
{
MailMessages.Subject = "Log In";
MailMessages.Body = "Сообщение";
smtpClient.Host = "smtp.gmail.com";
smtpClient.Port = 587;
smtpClient.EnableSsl = true;
smtpClient.DeliveryMethod = SmtpDeliveryMethod.Network;
smtpClient.UseDefaultCredentials = false;
smtpClient.Credentials = new NetworkCredential(email1.Address, "q1w2e3r4zqxwcevr");
smtpClient.Send(MailMessages);
}
}
Библиотеки все подключил:
using UnityEngine;
using System.Collections;
using System;
using System.Net;
using System.Net.Mail;
Но в unity выдаёт ошибку:
Assets/Scripts/Main.cs(5,18): error CS0234: The type or namespace name `Mail' does not exist in the namespace `System.Net'. Are you missing an assembly reference?