您现在的位置是:首页 > 前端 > UnityUnity
[Unity 3d] 用户邮件反馈模块
Tdou2020-03-12【Unity】人已围观
简介游戏上线之后因无服务器想接受用户反馈,这时候就需要一键生成基本的设备信息并反馈给我们,此模块自动读取unity相关api 获取设备信息。
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public static class EmailTool
{
public static void SendEmailCross(string email, string subject = null, string body = null)
{
if (string.IsNullOrEmpty(subject))
subject = EmailSubject();
if (string.IsNullOrEmpty(body))
body = EmailBody();
Func<string, string> EscapeURL = (string url) =>
{
return WWW.EscapeURL(url).Replace("+", "%20");
};
subject = EscapeURL(subject);
body = EscapeURL(body);
Application.OpenURL("mailto:" + email + "?subject=" + subject + "&body=" + body);
}
public static string EmailSubject()
{
return Application.productName + " V" + Application.version + " " + SystemInfo.deviceModel.ToString();
}
public static string EmailBody()
{
string info = "\n---Please don't delete the important info below!---";
info += "\n" + "App version=" + Application.version;
info += "\n" + "Device type=" + SystemInfo.deviceType.ToString();
info += "\n" + "Device model=" + SystemInfo.deviceModel.ToString();
info += "\n" + "Device os=" + SystemInfo.operatingSystem.ToString();
info += "\n" + "Device id=" + SystemInfo.deviceUniqueIdentifier.ToString();
info += "\n" + "Screen=" + Screen.width + "*" + Screen.height;
info += "\n" + "Lauguage=" + Application.systemLanguage;
return info;
}
}
很赞哦! ()
微信收款码
支付宝收款码
相关文章
随机图文
[Unity 3d] 用户邮件反馈模块
游戏上线之后因无服务器想接受用户反馈,这时候就需要一键生成基本的设备信息并反馈给我们,此模块自动读取unity相关api 获取设备信息。Unity 开源框架推荐
开源框架&库汇总 Ellan Jiang @Game Framework、熊猫 @ET、Catlib、凉鞋 @QFrameworkUGUI添加Canvas 组件调整渲染队列点击无响应解决方案
使用UGUI拼UI时候 需要通过canvas组件调整UI的渲染队列 ,但是添加后 整个组件和面板 无法点击 根据Canvas 调整渲染队列 还需要添加一个 Graphic Raycaster 组件 触发对应的[Unity 3d] Unity Logs Viewer (Unity真机查看log调试框)
Unity-Logs-Viewer, - Unity 真机可以查看Log的可视化插件。 GitHub 上的工程多如牛毛,有些好的code,但不经意间错过了就很难找回,故稍作整理,希望能帮助到有心人。