private MailMessage mail = new MailMessage();
void SendEmails()
{
mail.From = new MailAddress("GIVE_YOUR_EMAIL_HERE");
mail.To.Add("GIVE_YOUR_DESTINATION_HERE");
SmtpClient smtpServer = new SmtpClient("GIVE_SMTP_INFO_HERE");
smtpServer.Port = 587;//GIVE CORRECT PORT HERE
mail.Subject = "WHATEVER_YOU_WANT_TEXT";
mail.Body = "WHATEVER_YOU_WANT_TEXT";
smtpServer.Credentials = new System.Net.NetworkCredential("GIVE_SMTP_INFO_HERE", "GIVE_YOUR_EMAIL_PASSWORD_HERE") as ICredentialsByHost;
smtpServer.EnableSsl = true;
ServicePointManager.ServerCertificateValidationCallback =
delegate (object s, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors)
{ return true; };
smtpServer.Send(mail);
//smtpServer.SendAsync(mail)
Debug.Log("success");
}
GABY 發表在 痞客邦 留言(0) 人氣(33)
void SetColor()
{
Color aColor = new Color(mR, mG, mB, 1f);
mRenderer.materials[2].SetColor("_Color", aColor);
mText.text = "Hex: "+ColorUtility.ToHtmlStringRGB(aColor);
}
GABY 發表在 痞客邦 留言(0) 人氣(55)

測試環境:
Window 10
GABY 發表在 痞客邦 留言(0) 人氣(81)
1.前置作業:GABY 發表在 痞客邦 留言(0) 人氣(518)
GABY 發表在 痞客邦 留言(0) 人氣(45)

主旨:
使用PC跟Arduino版製作互動小遊戲,玩法是利用麥克風聲控來關閉遊戲內物件,請看影片https://www.youtube.com/watch?v=aFHmrqDpOZ0
GABY 發表在 痞客邦 留言(0) 人氣(7,951)

vuforia frame markers提供512組定義好的辯識物可以直接使用,不需要在vuforia後台製作,但是需要將FrameMarker這東西拉到場景上並且設定好ID.但是這次筆者需要使用512組總不能一個一個拉吧!
於是就動態生成吧!經過測試可以在ANDROID跟IOS使用,請注意
markerTracker = (MarkerTracker)TrackerManager.Instance.GetTracker<MarkerTracker>();GABY 發表在 痞客邦 留言(0) 人氣(214)
http://simcai.com/2015/11/29/Unity%E8%B5%84%E6%BA%90%E8%B7%AF%E5%BE%84%E5%8F%8A%E5%8A%A0%E8%BD%BD%E5%A4%96%E9%83%A8%E8%B5%84%E6%BA%90%E4%BB%8B%E7%BB%8D/
GABY 發表在 痞客邦 留言(0) 人氣(66)
https://www.assetstore.unity3d.com/en/#!/content/53264
GABY 發表在 痞客邦 留言(0) 人氣(65)
public class NTPClient
{
protected internal DateTime GetNtpTime(int iUTCAdd)
{
//const string ntpServer = "time.nist.gov";
const string ntpServer = "tick.stdtime.gov.tw";
byte[] ntpData = new byte[48];
//LeapIndicator = 0 (no warning), VersionNum = 3 (IPv4 only), Mode = 3 (Client Mode)
ntpData[0] = 0x1B;
IPAddress[] addresses = Dns.GetHostEntry(ntpServer).AddressList;
IPEndPoint ipEndPoint = new IPEndPoint(addresses[0], 123);
Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
socket.Connect(ipEndPoint);
socket.Send(ntpData);
socket.Receive(ntpData);
socket.Close();
const byte serverReplyTime = 40;
//Get the seconds part
ulong intPart = BitConverter.ToUInt32(ntpData, serverReplyTime);
//Get the seconds fraction
ulong fractPart = BitConverter.ToUInt32(ntpData, serverReplyTime + 4);
//Convert From big-endian to little-endian
intPart = SwapEndianness(intPart);
fractPart = SwapEndianness(fractPart);
var milliseconds = (intPart * 1000) + ((fractPart * 1000) / 0x100000000L);
//UTC time + 8
DateTime networkDateTime = (new DateTime(1900, 1, 1))
.AddMilliseconds((long)milliseconds).AddHours(iUTCAdd);
//UnityEngine.Debug.Log(networkDateTime);
return networkDateTime;
}
// stackoverflow.com/a/3294698/162671
uint SwapEndianness(ulong x)
{
return (uint)(((x & 0x000000ff) << 24) +
((x & 0x0000ff00) << 8) +
((x & 0x00ff0000) >> 8) +
((x & 0xff000000) >> 24));
}
}
GABY 發表在 痞客邦 留言(0) 人氣(2,233)