“hujiajun” 3 месяцев назад
Родитель
Сommit
3c96024bba

+ 127 - 0
Assets/GatewayHttp.cs

@@ -0,0 +1,127 @@
+using LitJson;
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Text;
+using UnityEngine;
+using UnityEngine.Networking;
+
+public class GatewayHttp : MonoBehaviour
+{
+    string baseUrl = "https://api-cs.ghz-tech.com/";
+    string username = "unity";
+    string password = "unitylisten";
+    Dictionary<string, string> requestHeader = new Dictionary<string, string>();  //  header
+    // Start is called before the first frame update
+    void Start()
+    {
+
+        Debug.Log("Start Queue SendHttp Start" + Application.version);
+        Dictionary<string, string> data = new Dictionary<string, string>();
+        data.Add("username", username);
+        data.Add("password", password);
+        StartCoroutine(SendHttp("nacos/v1/auth/users/login", data, (string json) => {
+
+            Debug.Log(json);
+            JsonData jdata = JsonMapper.ToObject(json);
+            Dictionary<string, string> data2 = new Dictionary<string, string>();
+            string pname = Application.productName.Replace(" ", "");
+            data2.Add("dataId", Application.version);
+            data2.Add("group", pname);
+            Debug.Log("login==>" + pname);
+            Debug.Log("login==>" + Application.version);
+            data2.Add("accessToken", jdata["accessToken"].ToString());
+            StartCoroutine(SendHttp("nacos/v1/cs/configs", data, (string json2) =>
+            {
+                JsonData backData = JsonMapper.ToObject(json2);
+               // HttpSDKAction.Instance.jsonData = json2;
+                string pt = "pro";
+#if UNITY_EDITOR
+                pt = "dev";
+#endif
+                NetWorkHeadersConfig.Remote_Net_url = backData["unity"]["url"][pt]["login"].ToString();
+                NetWorkHeadersConfig.Remote_Net_url = backData["unity"]["url"][pt]["manager"].ToString();
+                NetWorkHeadersConfig.Remote_SocketHall_url = backData["unity"]["url"][pt]["officeSocket"].ToString();
+               // NetWorkHeadersConfig.pointCloudUrl = backData["unity"]["url"][pt]["pointCloud"].ToString();
+                NetWorkHeadersConfig.Remote_SocketRtc_url = backData["unity"]["url"][pt]["roomSocket"].ToString();
+            }, false));
+
+
+        }));
+    }
+
+    void test()
+    {
+
+        JsonData data = new JsonData();
+        data["unity"] = new JsonData();
+        data["unity"]["url"] = new JsonData();
+        data["unity"]["devuser"] = new JsonData();
+        data["unity"]["url"]["dev"] = new JsonData();
+        data["unity"]["url"]["fat"] = new JsonData();
+        data["unity"]["url"]["pro"] = new JsonData();
+        data["unity"]["url"]["dev"]["login"] = "";
+        data["unity"]["url"]["dev"]["manager"] = "";
+        data["unity"]["url"]["dev"]["pointCloud"] = "";
+        data["unity"]["url"]["dev"]["roomSocket"] = "";
+        data["unity"]["url"]["dev"]["officeSocket"] = "";
+        data["unity"]["url"]["fat"]["login"] = "";
+        data["unity"]["url"]["fat"]["manager"] = "";
+        data["unity"]["url"]["fat"]["pointCloud"] = "";
+        data["unity"]["url"]["fat"]["roomSocket"] = "";
+        data["unity"]["url"]["fat"]["officeSocket"] = "";
+        data["unity"]["url"]["pro"]["login"] = "";
+        data["unity"]["url"]["pro"]["manager"] = "";
+        data["unity"]["url"]["pro"]["pointCloud"] = "";
+        data["unity"]["url"]["pro"]["roomSocket"] = "";
+        data["unity"]["url"]["pro"]["officeSocket"] = "";
+        data["unity"]["user"]["111@111.com"] = "dev";
+
+        Debug.Log(data.ToJson());
+    }
+    public void initHead()
+    {
+        requestHeader.Clear();
+        requestHeader.Add("Content-Type", "application/x-www-form-urlencoded");
+    }
+
+    public IEnumerator SendHttp(string methodName, Dictionary<string, string> fromDic, Action<string> CallBack, bool isPost = true)
+    {
+        Debug.Log("Start Queue SendHttp " + methodName);
+        string url = baseUrl + methodName;
+        UnityWebRequest webRequest;
+        if (!isPost)
+        {
+            url += "?";
+            foreach (var item in fromDic)
+            {
+                url += item.Key + "=" + item.Value + "&";
+            }
+
+            webRequest = UnityWebRequest.Get(url);
+
+        }
+        else
+        {
+            WWWForm form = new WWWForm();
+            foreach (var item in fromDic)
+            {
+                form.AddField(item.Key, item.Value);
+            }
+            webRequest = UnityWebRequest.Post(url, form);
+            webRequest.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded");
+        }
+        yield return webRequest.SendWebRequest();
+        if (webRequest.error !="")
+        {
+            Debug.LogError(webRequest.error);
+        }
+        else
+        {
+            string result = webRequest.downloadHandler.text;
+            CallBack(result);
+        }
+
+    }
+
+}

+ 1 - 1
Assets/XRToolkit/Builder/Editor/BuildDeployWindow.cs.meta → Assets/GatewayHttp.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: d7150a04ef923b44a88d6c049203d881
+guid: e1df9a05091fe422997cc22bbe5ff01e
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 2 - 1
Assets/MediaSoup/NetWork/NetWorkManager.cs

@@ -174,10 +174,11 @@ public class NetWorkManager : MonoBehaviour {
   
 	public static void TextureLoad(string session,Action<Material> success = null)
 	{
+		/*
 		WWWForm data = new WWWForm ();
 		data.AddField("session_id", session); 
 		string action = NetworkConfiguration.get_code_png_url;
-		NetWorkManager.instance.getNetTexture (action,data,success);
+		NetWorkManager.instance.getNetTexture (action,data,success);*/
 	}
 	
 }

+ 0 - 19
Assets/MediaSoup/NetWork/NetworkConfiguration.cs

@@ -4,24 +4,5 @@ using UnityEngine;
 
 public class NetworkConfiguration {
     
-    public const string yc_UrL = "http://api.shadowcreator.com/account/command/gateway";
-    public const string yc_UrL_test = "http://kstest.shadowcreator.com/uat/10007/public/index.php?s=index/command/gateway";
-    public const string user_UrL_test = "http://kstest.shadowcreator.com/uat/10008/free_v2/api/public/index.php?s=index/command/gateway";
-    public const string user_UrL = "https://api.shadowcreator.com/rtc/command/gateway";
-    public const string socket_Url = "wss://api.shadowcreator.com/wss/";
-    public const string socket_Url_test = "wss://studiosignaling.tech.shadowcreator.com/fatlobby/?appId=100009"; //
-    public const string socket_Url_test2 = "wss://studiosignaling.tech.shadowcreator.com/fatroom/?token="; //
-    //public const string socket_Url_test = "wss://cgdemo.shadowcreator.com/lobby/?appId=100009"; //
-    //public const string socket_Url_test2 = "wss://studiosignaling.tech.shadowcreator.com/fatroom/?token="; //
-
-
-    // public const string user_UrL = "http://kstest.shadowcreator.com/fat/10008/YC-1047/public/index.php?s=index/command/gateway";
-
-    public const string login_url = "http://api.shadowcreator.com/pro/auth/login_test";
-	public const string get_code_png_url = "http://api.shadowcreator.com/pro/auth/get_code_png";
-	public const string get_session_id = "http://api.shadowcreator.com/pro/auth/get_session_id";
-	public const string login_with_token = "https://api.shadowcreator.com/pro/auth/login_with_token";
-
-    public const string get_User_token = user_UrL;
 
 }

+ 3 - 3
Assets/MediaSoup/NetWorkHeadersConfig.cs

@@ -19,7 +19,7 @@ public class NetWorkHeadersConfig
     //public const string Remote_SocketHall_url = "wss://cloud-assistant.shadowcreator.com/lobby?";
     //public const string Remote_SocketRtc_url = "wss://cloud-assistant.shadowcreator.com/room?";
 
-    public const string Remote_Net_url = "https://support.ghz-tech.com:8843/api/";
-    public const string Remote_SocketHall_url = "wss://support.ghz-tech.com:8843/lobby/?";
-    public const string Remote_SocketRtc_url = "wss://support.ghz-tech.com:8843/room/?";
+    public static string Remote_Net_url = "https://support.ghz-tech.com:8843/api/";
+    public static string Remote_SocketHall_url = "wss://support.ghz-tech.com:8843/lobby/?";
+    public static string Remote_SocketRtc_url = "wss://support.ghz-tech.com:8843/room/?";
 }

+ 14 - 1
Assets/Scenes/Remote3.1Phone.unity

@@ -38,7 +38,7 @@ RenderSettings:
   m_ReflectionIntensity: 1
   m_CustomReflection: {fileID: 0}
   m_Sun: {fileID: 705507994}
-  m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1}
+  m_IndirectSpecularColor: {r: 0.44657815, g: 0.49641192, b: 0.57481617, a: 1}
   m_UseRadianceAmbientProbe: 0
 --- !u!157 &3
 LightmapSettings:
@@ -351,6 +351,7 @@ GameObject:
   - component: {fileID: 508279136}
   - component: {fileID: 508279137}
   - component: {fileID: 508279138}
+  - component: {fileID: 508279139}
   m_Layer: 0
   m_Name: _GameStart
   m_TagString: Untagged
@@ -408,6 +409,18 @@ MonoBehaviour:
   m_Script: {fileID: 11500000, guid: 95bd5e73b2b930240adab20b3c9619d2, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
+--- !u!114 &508279139
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 508279134}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: e1df9a05091fe422997cc22bbe5ff01e, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
 --- !u!1 &579147770
 GameObject:
   m_ObjectHideFlags: 0

+ 0 - 8
Assets/SoftMask/Scripts.meta

@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: 70a56c25f394a9449a6c1e2d72749bd8
-folderAsset: yes
-DefaultImporter:
-  externalObjects: {}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 1 - 1
Assets/StreamingAssets/build_info

@@ -1 +1 @@
-Build from SK-20211220VCWK at 2023/6/5 10:16:21
+Build from 胡佳骏的MacBook Pro at 6/18/2024 3:30:10 PM

+ 0 - 132
Assets/XRToolkit/Builder/Editor/BuildConfigInspector.cs

@@ -1,132 +0,0 @@
-using UnityEngine;
-#if UNITY_EDITOR
-using UnityEditor;
-#endif
-namespace XRTool.Util
-{
-    [InitializeOnLoad]
-    [CustomEditor(typeof(BuildConfig))]
-    public class BuildConfigInspector : Editor
-    {
-
-
-        //[MenuItem("GameObject/XR/XRCompents", priority = 0)]
-        //static void CreateXRCompents()
-        //{
-        //    CreateXRSession();
-        //    CreateXRNode();
-        //}
-        //[MenuItem("GameObject/XR/GameSession", priority = 0)]
-        //static void CreateXRSession()
-        //{
-        //    var obj = Instantiate(Resources.Load<GameSession>(typeof(GameSession).Name));
-        //    obj.name = (typeof(GameSession).Name);
-        //}
-        //[MenuItem("GameObject/XR/GameNode", priority = 0)]
-        //static void CreateXRNode()
-        //{
-        //    var obj = Instantiate(Resources.Load<GameNode>(typeof(GameNode).Name));
-        //    obj.name = (typeof(GameNode).Name);
-        //}
-        /// <summary>
-        /// 打包模式
-        /// </summary>
-        public SerializedProperty buildType;
-        /// <summary>
-        /// 资源访问方式
-        /// </summary>
-        public SerializedProperty assetsType;
-        /// <summary>
-        /// 运行的平台
-        /// </summary>
-        public SerializedProperty buildTarget;
-        /// <summary>
-        /// 运行的模式
-        /// </summary>
-        public SerializedProperty playType;
-        /// <summary>
-        /// 发布的平台
-        /// </summary>
-        public SerializedProperty buildTargetGroup;
-        public SerializedProperty languagePath;
-        public SerializedProperty useHand;
-        private void OnEnable()
-        {
-            buildType = serializedObject.FindProperty("buildType");
-            assetsType = serializedObject.FindProperty("assetsType");
-            buildTarget = serializedObject.FindProperty("buildTarget");
-            playType = serializedObject.FindProperty("playType");
-            buildTargetGroup = serializedObject.FindProperty("buildTargetGroup");
-            languagePath = serializedObject.FindProperty("languagePath");
-            useHand = serializedObject.FindProperty("useHand");
-            BuildConfig.Instance = target as BuildConfig;
-            //ReadGameVersion();
-        }
-        ///// <summary>
-        ///// 获取APP版本号,如果不存在,则从1.0.0.0开始计时
-        ///// </summary>
-        //public void ReadGameVersion()
-        //{
-        //    var conf = target as BuildConfig;
-        //    if (conf.version == null || conf.version.version == null)
-        //    {
-        //        conf.UpdateGameVersion();
-        //    }
-        //    conf.version = DataFileUtil.Instance.ReadJsonObjFormEditor("GameData/BuildConf/Version.json", conf.version);
-        //    //if (conf.version != null && conf.version.version != null)
-        //    //{
-        //    //    Debug.Log("版本号" + conf.version.version.ToString());
-        //    //}
-        //    PlayerSettings.bundleVersion = conf.version.version.ToString();
-        //}
-
-        public override void OnInspectorGUI()
-        {
-            serializedObject.Update();
-            var conf = target as BuildConfig;
-            if (conf.buildTarget == BuildTarget.Android)
-            {
-                conf.buildTargetGroup = BuildTargetGroup.Android;
-            }
-            if (conf.buildTarget == BuildTarget.iOS)
-            {
-                conf.buildTargetGroup = BuildTargetGroup.iOS;
-            }
-            if (conf.buildTarget == BuildTarget.StandaloneWindows)
-            {
-                conf.buildTargetGroup = BuildTargetGroup.Standalone;
-            }
-
-            EditorGUILayout.PropertyField(buildType, new GUIContent("打包模式,默认debug"));
-            EditorGUILayout.PropertyField(assetsType, new GUIContent("资源访问方式,默认editor"));
-            EditorGUILayout.PropertyField(buildTarget, new GUIContent("运行的平台,默认pc"));
-            EditorGUILayout.PropertyField(playType, new GUIContent("运行的模式,默认normal"));
-            EditorGUILayout.PropertyField(languagePath, new GUIContent("语言包路径"));
-            EditorGUILayout.PropertyField(useHand, new GUIContent("手势"));
-
-            //EditorGUILayout.PropertyField(buildTargetGroup, new GUIContent("发布的平台,默认Standalone"));
-            conf.otherSymbol = EditorGUILayout.TextField("宏", conf.otherSymbol);
-            EditorGUILayout.LabelField("Version", PlayerSettings.bundleVersion);
-            EditorGUILayout.LabelField("发布时间", conf.buildTime);
-            if (GUILayout.Button("重置版本号", GUILayout.Width(200)))
-            {
-                conf.appVersion = BuildDeployWindow.initVersion;
-                PlayerSettings.bundleVersion = conf.appVersion;
-            }
-            serializedObject.ApplyModifiedProperties();
-            if (GUI.changed)
-            {
-                EditorUtility.SetDirty(target);
-                string lastSym = PlayerSettings.GetScriptingDefineSymbolsForGroup(conf.buildTargetGroup);
-                ///设置指令用;分割
-                string symbol = string.Format("buildType_{0};assetsType_{1};buildPlatform_{2};playType_{3}",
-                    conf.buildType, conf.assetsType, conf.buildTarget, conf.playType).ToUpper() + ";" + conf.otherSymbol;
-                if (symbol != lastSym)
-                {
-                    Debug.Log(lastSym + "当前宏编译配置" + symbol);
-                    PlayerSettings.SetScriptingDefineSymbolsForGroup(conf.buildTargetGroup, symbol);
-                }
-            }
-        }
-    }
-}

+ 0 - 11
Assets/XRToolkit/Builder/Editor/BuildConfigInspector.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 69d2a99ff2f0a724a90733e096c7cf2f
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 511
Assets/XRToolkit/Builder/Editor/BuildDeployWindow.cs

@@ -1,511 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See LICENSE in the project root for license information.
-
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Threading;
-using UnityEditor;
-using UnityEditor.Build.Reporting;
-using UnityEngine;
-
-namespace XRTool.Util
-{
-    public enum BuildTargets
-    {
-        NoHand = 0,
-        Hand = 1,
-        Both = 2,
-        None = 3
-    }
-    /// <summary>
-    /// 打包窗口
-    /// </summary>
-    public class BuildDeployWindow : EditorWindow
-    {
-        private Vector2 scrollPos;
-        private static BuildConfig buildConf;
-        /// <inheritdoc />
-        public IEnumerable<string> Scenes { get; set; }
-        public string outputPath;
-        public bool isAutoUpdateVersion = true;
-        private bool isOpenOutPath = true;
-        private string realPath;
-        private string serverPath;
-        public BuildOptions buildOptions = BuildOptions.None;
-        private string[] suffix = new string[] { ".exe", ".apk", "Project", };
-        public string appName;
-        private int buildIndex = 2;
-        public const string initVersion = "1.0.0";
-        private string allSymbol;
-        private bool isAutoInstall = true;
-        private string androidSDPath = "sdcard/Android/data/";
-        private BuildTargets buildTargets;
-       
-        [MenuItem("XRTools/Build Window", false, 0)]
-        public static void OpenWindow()
-        {
-            // Dock it next to the Scene View.
-            var window = GetWindow<BuildDeployWindow>(typeof(SceneView));
-            window.titleContent = new GUIContent("Build Window");
-            window.Show();
-        }
-        private void OnEnable()
-        {
-            buildTargets = BuildTargets.None;
-            PlayerSettings.companyName = "shadowcreator";
-            buildIndex = 2;
-            if (buildConf == null)
-            {
-                if (BuildConfigMgr.Instance.IsInit)
-                {
-                    buildConf = BuildConfig.Instance;
-                }
-                else
-                {
-                    UnityLog.LogError("配置初始化失败!");
-                }
-                //buildConf = AssetDatabase.LoadAssetAtPath<BuildConfig>("Assets/GameData/BuildConf/BuildConfig.asset");
-            }
-            titleContent = new GUIContent("Build Window");
-            minSize = new Vector2(512, 256);
-            CheckVersion();
-            if (buildConf == null)
-            {
-                UnityLog.LogError("buildConf is null");
-            }
-            //UnityLog.Log(buildConf);
-        }
-        private void CheckVersion()
-        {
-            string version = PlayerSettings.bundleVersion;
-            string[] curversion = version.Split('.');
-            if (curversion.Length < 3)
-            {
-                PlayerSettings.bundleVersion = initVersion;
-                Debug.Log("版本号初始化:" + initVersion);
-            }
-        }
-        /// <summary>
-        /// 更新版本号,在打包时调用此函数
-        /// </summary>
-        public string UpdateGameVersion()
-        {
-            string version = PlayerSettings.bundleVersion;
-            string[] curversion = version.Split('.');
-            if (curversion.Length < 3)
-            {
-                Debug.LogError("请规范版本号:" + initVersion);
-                return PlayerSettings.bundleVersion;
-            }
-            ///测试版本,程序自测版本
-            if (buildConf.buildType == BuildType.Test)
-            {
-                return PlayerSettings.bundleVersion;
-            }
-            int startIndex = (int)buildConf.buildVersion;
-            int ver = int.Parse(curversion[startIndex]) + 1;
-            curversion[startIndex] = ver.ToString();
-            if (buildConf.buildVersion != BuildVersion.Build)
-            {
-                for (int i = startIndex + 1; i < curversion.Length; i++)
-                {
-                    curversion[i] = "0";
-                }
-            }
-            string newVersion = curversion[0];
-            for (int i = 1; i < curversion.Length; i++)
-            {
-                newVersion += "." + curversion[i];
-            }
-            return newVersion;
-        }
-        private void ChangeHand()
-        {
-            if (buildTargets == BuildTargets.Hand)
-            {
-                PlayerSettings.productName = BuildConfig.Instance.appProName + "WithHand";
-                BuildConfig.Instance.useHand = true;
-            }
-            else if (buildTargets == BuildTargets.NoHand)
-            {
-                PlayerSettings.productName = BuildConfig.Instance.appProName + "NoHand";
-                BuildConfig.Instance.useHand = false;
-            }
-            else
-            {
-                PlayerSettings.productName = BuildConfig.Instance.appProName;
-                BuildConfig.Instance.useHand = false;
-            }
-            if (buildTargets != BuildTargets.None)
-            {
-                PlayerSettings.applicationIdentifier = "com." + PlayerSettings.companyName + "." + PlayerSettings.productName;
-            }
-            BuildConfig.Instance.appPackName = PlayerSettings.applicationIdentifier;
-        }
-        /// <summary>
-        /// 属性展示和同步
-        /// </summary>
-        private void OnGUI()
-        {
-            //buildConf = EditorGUI.ObjectField(new Rect(0, 5, 600, 20), "BuildSetting", buildConf, typeof(BuildConfig), true) as BuildConfig;
-            if (!buildConf)
-            {
-                return;
-            }
-            scrollPos = GUI.BeginScrollView(new Rect(0, 30, position.width, position.height),
-           scrollPos, new Rect(0, 0, 1920, 2160));
-            BuildConfig.Instance.appProName = EditorGUILayout.TextField("应用名称", BuildConfig.Instance.appProName);
-            BuildConfig.Instance.appPackName = EditorGUILayout.TextField("包名", BuildConfig.Instance.appPackName);
-            buildConf.buildVersion = (BuildVersion)EditorGUILayout.EnumPopup("版本类型", buildConf.buildVersion);
-            buildConf.buildType = (BuildType)EditorGUILayout.EnumPopup("发布模式", buildConf.buildType);
-            buildConf.assetsType = (AssetsType)EditorGUILayout.EnumPopup("资源访问方式", buildConf.assetsType);
-            buildConf.buildTarget = (BuildTarget)EditorGUILayout.EnumPopup("运行的平台", buildConf.buildTarget);
-            buildConf.playType = (PlayType)EditorGUILayout.EnumPopup("运行的模式", buildConf.playType);
-            //buildConf.buildTargetGroup = (BuildTargetGroup)EditorGUILayout.EnumPopup("发布的平台", buildConf.buildTargetGroup);
-            buildConf.otherSymbol = EditorGUILayout.TextField("宏", buildConf.otherSymbol);
-            allSymbol = EditorGUILayout.TextField("全部宏", allSymbol);
-            if (string.IsNullOrEmpty(allSymbol))
-            {
-                allSymbol = PlayerSettings.GetScriptingDefineSymbolsForGroup(buildConf.buildTargetGroup);
-            }
-            isAutoUpdateVersion = EditorGUILayout.Toggle("更新版本", isAutoUpdateVersion);
-            isOpenOutPath = EditorGUILayout.Toggle("打开输出路径", isOpenOutPath);
-            if (buildConf.buildTarget == BuildTarget.Android)
-            {
-                isAutoInstall = EditorGUILayout.Toggle("自动安装", isAutoInstall);
-            }
-            EditorGUILayout.LabelField("Version", PlayerSettings.bundleVersion);
-            EditorGUILayout.LabelField("发布时间", buildConf.buildTime);
-            outputPath = EditorGUILayout.TextField("输出路径", outputPath);
-            if (string.IsNullOrEmpty(outputPath))
-            {
-                string path = Application.dataPath;
-                path = path.Substring(0, path.LastIndexOf("/"));
-                outputPath = path;
-            }
-            realPath = EditorGUILayout.TextField("完整路径", realPath);
-            serverPath = EditorGUILayout.TextField("服务器地址", serverPath);
-            androidSDPath = EditorGUILayout.TextField("安卓sd卡路径", androidSDPath);
-            if (string.IsNullOrEmpty(realPath))
-            {
-                realPath = Path.Combine(outputPath, buildConf.buildTarget.ToString(), buildConf.playType.ToString(), Application.productName);
-            }
-            buildOptions = (BuildOptions)EditorGUILayout.EnumPopup("发布设置", buildOptions);
-            var bd = buildTargets;
-            buildTargets = (BuildTargets)EditorGUILayout.EnumPopup("发布操作方式", buildTargets);
-            if (bd != buildTargets)
-            {
-                ChangeHand();
-            }
-            if (GUILayout.Button("重置版本号", GUILayout.Width(200)))
-            {
-                buildConf.appVersion = initVersion;
-                PlayerSettings.bundleVersion = buildConf.appVersion;
-            }
-            if (GUILayout.Button("强制升级版本", GUILayout.Width(200)))
-            {
-                PlayerSettings.bundleVersion = UpdateGameVersion();
-            }
-            if (GUILayout.Button("同步设置", GUILayout.Width(200)))
-            {
-                SetDef();
-            }
-            if (GUILayout.Button("清空编辑器日志", GUILayout.Width(200)))
-            {
-                UnityLog.ClearAllLog();
-            }
-            if (GUILayout.Button("打开编辑器缓存路径", GUILayout.Width(200)))
-            {
-                OpenDirectory(Application.persistentDataPath);
-            }
-            if (buildConf.buildTarget == BuildTarget.Android && GUILayout.Button("安装", GUILayout.Width(200)))
-            {
-                if (!string.IsNullOrEmpty(appName) && !string.IsNullOrEmpty(realPath))
-                {
-                    InstallApp(Path.Combine(realPath, appName));
-                }
-            }
-            if (buildConf.buildTarget == BuildTarget.Android && GUILayout.Button("卸载", GUILayout.Width(200)))
-            {
-                if (!string.IsNullOrEmpty(appName) && !string.IsNullOrEmpty(realPath))
-                {
-                    UnInstallApp();
-                }
-            }
-
-            if (GUILayout.Button("清空Androd日志", GUILayout.Width(200)))
-            {
-                if (Directory.Exists(realPath + "/LogData"))
-                {
-                    Directory.Delete(realPath + "/LogData", true);
-                }
-            }
-            if (GUILayout.Button("拷贝缓存数据", GUILayout.Width(150)))
-            {
-                string resPath = "sdcard/ShadowCreate/MRStores/";
-                string logPath = realPath + "/ShadowCreate/MRStores/";
-                string[] files = new string[] { "DeviceDownInfo.xml" };
-                if (!Directory.Exists(logPath))
-                {
-                    Directory.CreateDirectory(logPath);
-                }
-                for (int i = 0; i < files.Length; i++)
-                {
-                    string tmpPath = logPath + "/" + files[i];
-                    if (File.Exists(tmpPath))
-                    {
-                        File.Delete(tmpPath);
-                    }
-                    Thread newThread = new Thread(new ParameterizedThreadStart(RunCmd));
-                    string adb = "adb pull " + resPath + files[i] + " " + logPath;
-                    newThread.Start(adb);
-                }
-                OpenDirectory(logPath);
-            }
-            if (GUILayout.Button("拷贝日志到本地", GUILayout.Width(150)))
-            {
-                string resPath = androidSDPath + Application.identifier + "/files/LogData/";
-
-                string logPath = realPath + "/LogData/" + buildConf.buildType.ToString() +
-                    "_" + PlayerSettings.bundleVersion + "/" + Application.version;
-                string[] files = new string[] { "error.txt", "except.txt", "log.txt" };
-                if (!Directory.Exists(logPath))
-                {
-                    Directory.CreateDirectory(logPath);
-                }
-                for (int i = 0; i < files.Length; i++)
-                {
-                    string tmpPath = logPath + "/" + files[i];
-                    if (File.Exists(tmpPath))
-                    {
-                        File.Delete(tmpPath);
-                    }
-                    Thread newThread = new Thread(new ParameterizedThreadStart(RunCmd));
-                    string adb = "adb pull " + resPath + files[i] + " " + logPath;
-                    newThread.Start(adb);
-                }
-                OpenDirectory(logPath);
-            }
-            if (GUILayout.Button("推送服务器地址", GUILayout.Width(150)))
-            {
-                string targetPath = androidSDPath + Application.identifier + "/files/";
-                Thread newThread = new Thread(new ParameterizedThreadStart(RunCmd));
-                string adb = "adb push " + serverPath + " " + targetPath;
-                newThread.Start(adb);
-            }
-            if (GUILayout.Button("发布", GUILayout.Width(150)))
-            {
-                if (buildTargets != BuildTargets.Both)
-                {
-                    DisPlayBuild(buildTargets);
-                }
-                else
-                {
-                    ///先安装手势版本,再安装无手势版本
-                    DisPlayBuild(BuildTargets.Hand);
-                    isAutoUpdateVersion = false;
-                    DisPlayBuild(BuildTargets.NoHand);
-                }
-            }
-            GUI.EndScrollView();
-            //GUI.EndScrollView();
-            if (GUI.changed)
-            {
-                UpdateSetting();
-            }
-        }
-
-        public void DisPlayBuild(BuildTargets buildTargets)
-        {
-            string lastBuildTime = buildConf.buildTime;
-            buildConf.buildTime = DateTime.Now.ToString();
-            EditorUtility.SetDirty(buildConf);
-            this.buildTargets = buildTargets;
-            ChangeHand();
-            ///设置宏编译指令
-            SetDef();
-            string lastVersion = PlayerSettings.bundleVersion;
-            UpdateSetting();
-            string newVersion = isAutoUpdateVersion ? UpdateGameVersion() : lastVersion;
-            PlayerSettings.bundleVersion = newVersion;
-            appName = Application.productName + "_" + buildConf.buildType.ToString() +
-                "_" + PlayerSettings.bundleVersion + "_" + DateTime.Now.ToString("MMddHHmm") + suffix[buildIndex];
-            bool isSucess = PlayerBuild(Path.Combine(realPath, appName));
-            if (!isSucess)
-            {
-                PlayerSettings.bundleVersion = lastVersion;
-                buildConf.buildTime = lastBuildTime;
-                EditorUtility.SetDirty(buildConf);
-            }
-            else
-            {
-                if (isOpenOutPath)
-                {
-                    OpenDirectory(realPath);
-                }
-                if (buildConf.buildTarget == BuildTarget.Android && isAutoInstall)
-                {
-                    InstallApp(Path.Combine(realPath, appName));
-                }
-            }
-            Debug.Log("当前版本" + PlayerSettings.bundleVersion);
-        }
-        private void InstallApp(string realPath)
-        {
-            if (File.Exists(realPath))
-            {
-                Thread newThread = new Thread(new ParameterizedThreadStart(RunCmd));
-                string cmd = "adb install -r -d " + realPath;
-                newThread.Start(cmd);
-            }
-            else
-            {
-                UnityLog.LogError(realPath + " 不存在");
-            }
-        }
-        private void UnInstallApp()
-        {
-            Thread newThread = new Thread(new ParameterizedThreadStart(RunCmd));
-            string cmd = "adb uninstall " + Application.identifier;
-            newThread.Start(cmd);
-        }
-
-        private void UpdateSetting()
-        {
-            if (buildConf.buildTarget == BuildTarget.Android)
-            {
-                buildConf.buildTargetGroup = BuildTargetGroup.Android;
-                if (EditorUserBuildSettings.exportAsGoogleAndroidProject)
-                {
-                    buildIndex = 2;
-                }
-                else
-                {
-                    buildIndex = 1;
-                }
-            }
-            if (buildConf.buildTarget == BuildTarget.iOS)
-            {
-                buildConf.buildTargetGroup = BuildTargetGroup.iOS;
-                buildIndex = 2;
-            }
-            if (buildConf.buildTarget == BuildTarget.StandaloneWindows)
-            {
-                buildConf.buildTargetGroup = BuildTargetGroup.Standalone;
-                buildIndex = 0;
-            }
-            //buildConf.buildType.ToString(), buildConf.playType.ToString(),
-            realPath = Path.Combine(outputPath, Application.productName, buildConf.buildTarget.ToString(), buildConf.playType.ToString());
-
-        }
-        private bool PlayerBuild(string path)
-        {
-
-            if (EditorUserBuildSettings.activeBuildTarget != buildConf.buildTarget)
-            {
-                EditorUserBuildSettings.SwitchActiveBuildTarget(buildConf.buildTargetGroup, buildConf.buildTarget);
-            }
-            BuildReport buildReport = Build(path);
-            bool success = buildReport != null && buildReport.summary.result == BuildResult.Succeeded;
-
-            return success;
-        }
-        private BuildReport Build(string path)
-        {
-            Scenes = EditorBuildSettings.scenes.Where(scene => scene.enabled).Select(scene => scene.path);
-
-            EditorUtility.DisplayProgressBar("Build Pipeline", "Gathering Build Data...", 0.25f);
-            BuildReport buildReport = default;
-            try
-            {
-                buildReport = BuildPipeline.BuildPlayer(
-                    Scenes.ToArray(),
-                    path,
-                    EditorUserBuildSettings.activeBuildTarget, buildOptions);
-            }
-            catch (Exception e)
-            {
-                Debug.LogError($"{e.Message}\n{e.StackTrace}");
-            }
-            EditorUtility.ClearProgressBar();
-            return buildReport;
-        }
-        private void SetDef()
-        {
-            string lastSym = PlayerSettings.GetScriptingDefineSymbolsForGroup(buildConf.buildTargetGroup);
-            Debug.Log(lastSym);
-            ///设置指令用;分割
-            string symbol = string.Format("buildType_{0};assetsType_{1};buildPlatform_{2};playType_{3}",
-                buildConf.buildType, buildConf.assetsType, buildConf.buildTarget, buildConf.playType).ToUpper() + ";" + buildConf.otherSymbol;
-            if (symbol != lastSym)
-            {
-                Debug.Log(lastSym + "当前宏编译配置:" + symbol);
-                PlayerSettings.SetScriptingDefineSymbolsForGroup(buildConf.buildTargetGroup, symbol);
-            }
-            allSymbol = symbol;
-        }
-
-        /// <summary>
-        /// 弹出指定的文件窗口,仅windows和mac使用
-        /// </summary>
-        /// <param name="path"></param>
-        public static void OpenDirectory(string path)
-        {
-            if (string.IsNullOrEmpty(path)) return;
-
-            if (!Directory.Exists(path))
-            {
-                UnityEngine.Debug.LogError("No Directory: " + path);
-                return;
-            }
-
-            //Application.dataPath 只能在主线程中获取
-            int lastIndex = Application.dataPath.LastIndexOf("/");
-            string shellPath = Application.dataPath.Substring(0, lastIndex) + "/Shell/";
-
-            // 新开线程防止锁死
-            Thread newThread = new Thread(new ParameterizedThreadStart(CmdOpenDirectory));
-            newThread.Start(path);
-        }
-
-        private static void CmdOpenDirectory(object obj)
-        {
-            System.Diagnostics.Process p = new System.Diagnostics.Process();
-#if UNITY_EDITOR_WIN
-            p.StartInfo.FileName = "cmd.exe";
-            p.StartInfo.Arguments = "/c start " + obj.ToString();
-#elif UNITY_EDITOR_OSX
-        p.StartInfo.FileName = "bash";
-        string shPath = shellPath + "openDir.sh";
-        p.StartInfo.Arguments = shPath + " " + obj.ToString();
-#endif
-            //UnityEngine.Debug.Log(p.StartInfo.Arguments);
-            p.StartInfo.UseShellExecute = false;
-            p.StartInfo.RedirectStandardInput = true;
-            p.StartInfo.RedirectStandardOutput = true;
-            p.StartInfo.RedirectStandardError = true;
-            p.StartInfo.CreateNoWindow = true;
-            p.Start();
-
-            p.WaitForExit();
-            p.Close();
-        }
-        private static void RunCmd(object command)
-        {
-            //例Process
-            System.Diagnostics.Process p = new System.Diagnostics.Process();
-            p.StartInfo.FileName = "cmd.exe";         //确定程序名
-            p.StartInfo.Arguments = "/c " + command.ToString();   //确定程式命令行
-            p.StartInfo.UseShellExecute = false;      //Shell的使用
-            p.StartInfo.RedirectStandardInput = true;  //重定向输入
-            p.StartInfo.RedirectStandardOutput = true; //重定向输出
-            p.StartInfo.RedirectStandardError = true;  //重定向输出错误
-            p.StartInfo.CreateNoWindow = false;        //设置置不显示示窗口
-            p.Start();
-            //return p.StandardOutput.ReadToEnd();      //输出出流取得命令行结果果
-        }
-
-    }
-}

+ 38 - 0
MRSupper_Phone.sln

@@ -0,0 +1,38 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 15
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly-CSharp", "Assembly-CSharp.csproj", "{127DCE2A-90C8-A98C-A411-6AD69C145CEB}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NativeGallery.Runtime", "NativeGallery.Runtime.csproj", "{77EE7BCF-0227-86B1-F90A-0B9700A1C387}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly-CSharp-Editor", "Assembly-CSharp-Editor.csproj", "{91DAF1CE-77BB-D4DC-F8B3-71E86313170F}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NativeGallery.Editor", "NativeGallery.Editor.csproj", "{3D16AE52-FCB2-4B8A-47EA-4931E5C21D9C}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Release|Any CPU = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{127DCE2A-90C8-A98C-A411-6AD69C145CEB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{127DCE2A-90C8-A98C-A411-6AD69C145CEB}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{127DCE2A-90C8-A98C-A411-6AD69C145CEB}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{127DCE2A-90C8-A98C-A411-6AD69C145CEB}.Release|Any CPU.Build.0 = Release|Any CPU
+		{77EE7BCF-0227-86B1-F90A-0B9700A1C387}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{77EE7BCF-0227-86B1-F90A-0B9700A1C387}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{77EE7BCF-0227-86B1-F90A-0B9700A1C387}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{77EE7BCF-0227-86B1-F90A-0B9700A1C387}.Release|Any CPU.Build.0 = Release|Any CPU
+		{91DAF1CE-77BB-D4DC-F8B3-71E86313170F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{91DAF1CE-77BB-D4DC-F8B3-71E86313170F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{91DAF1CE-77BB-D4DC-F8B3-71E86313170F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{91DAF1CE-77BB-D4DC-F8B3-71E86313170F}.Release|Any CPU.Build.0 = Release|Any CPU
+		{3D16AE52-FCB2-4B8A-47EA-4931E5C21D9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{3D16AE52-FCB2-4B8A-47EA-4931E5C21D9C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{3D16AE52-FCB2-4B8A-47EA-4931E5C21D9C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{3D16AE52-FCB2-4B8A-47EA-4931E5C21D9C}.Release|Any CPU.Build.0 = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal

Разница между файлами не показана из-за своего большого размера
+ 0 - 24
NativeGallery.Editor.csproj


Разница между файлами не показана из-за своего большого размера
+ 0 - 24
NativeGallery.Runtime.csproj


+ 1 - 1
ProjectSettings/PackageManagerSettings.asset

@@ -17,7 +17,7 @@ MonoBehaviour:
   m_Registries:
   - m_Id: main
     m_Name: 
-    m_Url: https://packages.unity.cn
+    m_Url: https://packages.unity.com
     m_Scopes: []
     m_IsDefault: 1
   m_UserSelectedRegistryName: 

+ 2 - 2
ProjectSettings/ProjectVersion.txt

@@ -1,2 +1,2 @@
-m_EditorVersion: 2019.4.32f1c1
-m_EditorVersionWithRevision: 2019.4.32f1c1 (55f062fbe553)
+m_EditorVersion: 2019.4.40f1
+m_EditorVersionWithRevision: 2019.4.40f1 (ffc62b691db5)

BIN
mrsupport_20240618_phone.apk


Некоторые файлы не были показаны из-за большого количества измененных файлов