Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- spread 연산자
- Camera Movement
- linux
- Google Developer API
- express
- Digital Ocean
- Google Refund
- Unity IAP
- MySQL
- mongoDB
- --watch
- rpg server
- unity
- draganddrop
- react
- css framework
- OverTheWire
- java
- Unity Editor
- docker
- screencapture
- nodejs
- Spring Boot
- springboot
- Git
- Packet Network
- SDK upgrade
- Camera Zoom
- server
- critical rendering path
Archives
- Today
- Total
우당탕탕 개발일지
[Unity] 메일 문의하기 본문
게임을 플레이하다보면 문의사항이 필요한데, 자동으로 자신의 닉네임이나 아이디, 디바이스 정보를 함께 보내주면 매우 편리하다. 디바이스에 설치되어있는 메일 어플을 켜고 , 받는이와 유저정보를 미리 넣어주면 된다. 유저는 질문사항만 간단하게 넣거나 메일 어플을 이용해 사진을 첨부할 수도 있다. 참 쉽죠잉?
using CodeStage.AntiCheat.ObscuredTypes;
using UnityEngine;
using UnityEngine.Networking;
public class RequestMail
{
public string userEmail;
public string userNickname;
public string userIndate;
public string title;
public string body;
public RequestMail(string email = "", string title = "", string body = "")
{
var storage = PlayerStorage.GetInstance();
userEmail = email;
userNickname = storage.account.nickname; //유저의 닉네임을 넣어준다
userIndate = storage.account.inDate; //유저의 uid를 넣어준다
this.title = title;
this.body = body;
}
}
public class MailUtility
{
static ObscuredString email_Google = "yourGoogelEmail";
public static void SendWithApplication()
{
RequestMail mail = new RequestMail();
string subject = GetDefaultTitle(mail.userNickname);
string body = GetDefaultBody(mail);
Application.OpenURL("mailto:" + email_Google + "?subject=" + subject + "&body=" + body);
}
static string GetDefaultTitle(string nick)
{
return EscapeURL
(
"[" + nick + "]"
);
}
static string GetDefaultBody(RequestMail mail)
{
return EscapeURL
(
"\n\n" +
"________\n\n" +
"Device Model : " + SystemInfo.deviceModel + "\n" +
"Device OS : " + SystemInfo.operatingSystem + "\n" +
"UserNickname :" + mail.userNickname + " (" + mail.userIndate + ")\n\n" +
"________\n"
);
}
static string EscapeURL(string URL)
{
return UnityWebRequest.EscapeURL(URL).Replace("+", "%20");
}
}
'Unity' 카테고리의 다른 글
[Unity] Google Admob 광고보고 간헐적으로 튕기는 현상 (0) | 2023.11.02 |
---|---|
[Unity]UGUI Particle Mask (0) | 2023.09.11 |
[Unity] Android 앱 이름 Localization (0) | 2023.08.06 |
[Unity] Custom Editor - MenuItem을 만들어보자 (0) | 2023.07.27 |
[Unity] Unity IAP 설정 (0) | 2023.07.19 |