Esempio n. 1
0
        /// <summary>
        /// 复制日志
        /// </summary>
        void CopyLogs()
        {
            string result = "";

            foreach (LogVO log in GlobalData.logs)
            {
                if (result != "")
                {
                    result += "\n";
                }
                result += log.message + log.stackTrace;
            }
            if (Application.platform == RuntimePlatform.Android)
            {
                AndroidSdkInterface.CopyToClip(result);
            }
            if (!Application.isMobilePlatform)
            {
                TextEditor textEditor = new TextEditor();
                textEditor.text = result;
                textEditor.OnFocus();
                textEditor.Copy();
            }
        }
Esempio n. 2
0
        /// <summary>
        /// 复制日志
        /// </summary>
        void CopyLogs()
        {
            StringBuilder result = new StringBuilder();

            foreach (LogVO log in GlobalData.logs)
            {
                if (result.Length > 0)
                {
                    result.Append("\n");
                }
                result.Append(log.message + log.stackTrace);
            }
            if (Application.platform == RuntimePlatform.Android)
            {
                AndroidSdkInterface.CopyToClip(result.ToString());
            }
            if (!Application.isMobilePlatform)
            {
                TextEditor textEditor = new TextEditor();
                textEditor.text = result.ToString();
                textEditor.OnFocus();
                textEditor.Copy();
            }
        }