Explorar el Código

ios打包修改

123 hace 1 año
padre
commit
c1a1620d00

BIN
Assets/Content/Raw_Art/UI/UILanuch/img_logo_01.png


+ 14 - 1
Assets/Editor/AssetBundle/AssetBundleMap.cs

@@ -217,6 +217,7 @@ public class AssetBundleMap : EditorWindow
                 if (fileName == "assetbundle")
                 {
                     fileName = AssetsObscureUtil.GetABFileName(fileName);
+                    LogABName("assetbundle", fileName);
                 }
                 else if (fileName == $"{ GetAssetsMappingName()}.bytes")
                 {
@@ -406,7 +407,7 @@ public class AssetBundleMap : EditorWindow
             AssetBundleBuild bundle = new AssetBundleBuild();
             bundle.assetBundleName = AssetsObscureUtil.GetABFileName(items.Key);
             bundle.assetNames = items.Value.ToArray();
-
+            LogABName(items.Key,bundle.assetBundleName);
             if (bundle.assetNames.Length == 0)
             {
                 Debug.LogWarning(items.Key + " empty assetNames");
@@ -425,6 +426,18 @@ public class AssetBundleMap : EditorWindow
         return bm.ToArray();
     }
 
+    static string[] logNames = new string[] { "font.unity3d", "shader.unity3d", "UITexture_UILanuch.unity3d" , "UITexture_UILoading.unity3d", "UILanuch_uiprefab.unity3d", "UILoading_uiprefab.unity3d", "assetbundle" };
+    private static void LogABName(string name,string abname)
+    {
+        if (logNames.Contains(name))
+        {
+            Debug.Log($"=========== 包名:【{name}】  ab包名【{abname}】");
+        }
+        else
+        {
+            Debug.Log($"包名:【{name}】  ab包名【{abname}】");
+        }
+    }
     /// <summary>
     /// 只构建lua相关的资源
     /// </summary>

+ 8 - 4
Assets/Editor/AssetBundle/CheckHotUpdateRes.cs

@@ -57,9 +57,10 @@ public class CheckHotUpdateRes : EditorWindow
 #if UNITY_IOS
         info.VersionFileName = "afivs";
         info.mainfestFileName = "afimft";
-//#else
-//        versionFileName = "Version";
-//        assetsFileName = "mainfest";
+        info.NewPath = Application.dataPath + "/StreamingAssets/unityRes";
+        //#else
+        //        versionFileName = "Version";
+        //        assetsFileName = "mainfest";
 #endif
         needResList = new List<VersionInfoData>();
     }
@@ -278,7 +279,10 @@ public class CheckHotUpdateRes : EditorWindow
 
         for (int i = 0; i < size; i++)
         {
-           
+            if (needResList[i].FullName == "Version")
+            {
+                continue;
+            }
             byte[] fdatas = File.ReadAllBytes(datapath + needResList[i].FullName);
 
             FileHelper.WirteToFile( $"{info.OutputPath}/{needResList[i].FullName}" ,fdatas);

+ 1 - 1
Assets/Editor/AssetBundle/CheckResWindowInfo.cs

@@ -9,7 +9,7 @@ public class CheckResWindowInfo : ScriptableObject
     public string OldPath = "C:/Users/Administrator/Desktop/My/项目/0";
 
 #if UNITY_IOS
-    public string NewPath = "./StreamingAssets/ios";
+    public string NewPath = "./StreamingAssets/unityRes";
 #else
     public string NewPath =  "./StreamingAssets/AssetsAndroid";
 #endif

+ 14 - 14
Assets/Editor/Pack/Platform/PackPlatformiOSBuild.cs

@@ -236,20 +236,20 @@ namespace Pack
                                         "_VendorID = AllocCString([WentingSDK GetUUID]);");
                 script.Save();
 
-                if (plugins.Contains("Lebian"))
-                {
-                    string unityAppControllerMMPath = Path.Combine(outPath, "Classes/UnityAppController.mm");
-                    script = new ObjCScript(unityAppControllerMMPath);
-                    script.AddImport("LBSDK/LBInit.h", true);
-                    int idx = script.FindLine("::printf(\"-> applicationDidFinishLaunching()\\n\");");
-                    script.InsertLine(idx, idx + 1);
-                    script.InsertLine(idx, idx + 2, "// 请务必在方法的最前面调用该接口,否则很容易出问题");
-                    script.InsertLine(idx, idx + 3, "if ([[LBInit sharedInstance] LBSDKShouldInitWithLaunchOptions:launchOptions]) {");
-                    script.InsertLine(idx, idx + 4, "\treturn YES;");
-                    script.InsertLine(idx, idx + 5, "}");
-                    script.InsertLine(idx, idx + 6);
-                    script.Save();
-                }
+                //if (plugins.Contains("Lebian"))
+                //{
+                //    string unityAppControllerMMPath = Path.Combine(outPath, "Classes/UnityAppController.mm");
+                //    script = new ObjCScript(unityAppControllerMMPath);
+                //    script.AddImport("LBSDK/LBInit.h", true);
+                //    int idx = script.FindLine("::printf(\"-> applicationDidFinishLaunching()\\n\");");
+                //    script.InsertLine(idx, idx + 1);
+                //    script.InsertLine(idx, idx + 2, "// 请务必在方法的最前面调用该接口,否则很容易出问题");
+                //    script.InsertLine(idx, idx + 3, "if ([[LBInit sharedInstance] LBSDKShouldInitWithLaunchOptions:launchOptions]) {");
+                //    script.InsertLine(idx, idx + 4, "\treturn YES;");
+                //    script.InsertLine(idx, idx + 5, "}");
+                //    script.InsertLine(idx, idx + 6);
+                //    script.Save();
+                //}
 
                 if (plugins.Contains("WentingLicense"))
                 {

+ 1 - 1
Assets/Src/Core/DownLoad/DownloadMgr.cs

@@ -145,7 +145,7 @@ public class DownloadMgr : Singleton<DownloadMgr>
             downloadUrl = GetDownloadUrl();
 
 
-            downloadTaskMaxNum = 1;
+            downloadTaskMaxNum = 3;
             localFilePath = GetLocalResPath();//FileSystem.LocalDocumentPath;
 
 #if UNITY_IOS

+ 10 - 1
Assets/Src/GameLogic/LaunchLoadMgr.cs

@@ -147,6 +147,14 @@ public class LaunchLoadMgr
                 if (isFinish)
                 {
                     SetLoadPrecent(100);
+#if UNITY_IOS
+                    if (DownloadMgr.Instance.DowmloadError)
+                    {
+                        isFinish = false;
+                        SetLoadDes("資源更新失敗,請重新啟動遊戲下載資源");
+                    }
+#endif
+                  
                 }
                 else
                 {
@@ -156,7 +164,8 @@ public class LaunchLoadMgr
                     SetLoadPrecent((int)press);
                 }
 
-                return isFinish;
+
+                    return isFinish;
             });
         }
 

+ 4 - 4
ProjectSettings/ProjectSettings.asset

@@ -13,7 +13,7 @@ PlayerSettings:
   useOnDemandResources: 0
   accelerometerFrequency: 60
   companyName: WentingTec
-  productName: "\u5FC3\u529B\u7269\u8BED"
+  productName: "\u521D\u5FC3\u8005\u5927\u5192\u96AA"
   defaultCursor: {fileID: 0}
   cursorHotspot: {x: 0, y: 0}
   m_SplashScreenBackgroundColor: {r: 1, g: 1, b: 1, a: 1}
@@ -138,7 +138,7 @@ PlayerSettings:
     16:10: 1
     16:9: 1
     Others: 1
-  bundleVersion: 1.0.0.6
+  bundleVersion: 0.1.0
   preloadedAssets: []
   metroInputSource: 0
   wsaTransparentSwapchain: 0
@@ -846,10 +846,10 @@ PlayerSettings:
   webGLDecompressionFallback: 1
   webGLPowerPreference: 1
   scriptingDefineSymbols:
-    Android: USE_LUA;VUPLEX_CCU;BUGLY;FPS_DISABLE
+    Android: USE_LUA;VUPLEX_CCU
     Standalone: USE_LUA;VUPLEX_CCU
     WebGL: USE_LUA;VUPLEX_CCU
-    iPhone: USE_LUA;VUPLEX_CCU
+    iPhone: USE_LUA;VUPLEX_CCU;BUGLY;FPS_DISABLE
   additionalCompilerArguments: {}
   platformArchitecture:
     iPhone: 1

+ 19 - 19
UserSettings/Layouts/default-2021.dwlt

@@ -43,7 +43,7 @@ MonoBehaviour:
     width: 1304
     height: 903
   m_ShowMode: 4
-  m_Title: Console
+  m_Title: Hierarchy
   m_RootView: {fileID: 5}
   m_MinSize: {x: 875, y: 300}
   m_MaxSize: {x: 10000, y: 10000}
@@ -67,8 +67,8 @@ MonoBehaviour:
     y: 0
     width: 546
     height: 887
-  m_MinSize: {x: 200, y: 200}
-  m_MaxSize: {x: 4000, y: 4000}
+  m_MinSize: {x: 200, y: 221}
+  m_MaxSize: {x: 4000, y: 4021}
   m_ActualView: {fileID: 16}
   m_Panes:
   - {fileID: 16}
@@ -97,7 +97,7 @@ MonoBehaviour:
   m_MinSize: {x: 200, y: 221}
   m_MaxSize: {x: 4000, y: 4021}
   vertical: 0
-  controlID: 79
+  controlID: 34
 --- !u!114 &5
 MonoBehaviour:
   m_ObjectHideFlags: 52
@@ -193,7 +193,7 @@ MonoBehaviour:
   m_MinSize: {x: 300, y: 200}
   m_MaxSize: {x: 24288, y: 16192}
   vertical: 0
-  controlID: 17
+  controlID: 15
 --- !u!114 &9
 MonoBehaviour:
   m_ObjectHideFlags: 52
@@ -218,7 +218,7 @@ MonoBehaviour:
   m_MinSize: {x: 200, y: 200}
   m_MaxSize: {x: 16192, y: 16192}
   vertical: 1
-  controlID: 111
+  controlID: 16
 --- !u!114 &10
 MonoBehaviour:
   m_ObjectHideFlags: 52
@@ -243,7 +243,7 @@ MonoBehaviour:
   m_MinSize: {x: 200, y: 100}
   m_MaxSize: {x: 16192, y: 8096}
   vertical: 0
-  controlID: 112
+  controlID: 17
 --- !u!114 &11
 MonoBehaviour:
   m_ObjectHideFlags: 52
@@ -547,7 +547,7 @@ MonoBehaviour:
       scrollPos: {x: 0, y: 0}
       m_SelectedIDs: 
       m_LastClickedID: 0
-      m_ExpandedIDs: e4faffff
+      m_ExpandedIDs: a240fefff440feffa644feffb444feffe4faffff
       m_RenameOverlay:
         m_UserAcceptedRename: 0
         m_Name: 
@@ -864,9 +864,9 @@ MonoBehaviour:
   m_PlayAudio: 0
   m_AudioPlay: 0
   m_Position:
-    m_Target: {x: 0.053652834, y: -0.41136077, z: 0.7194671}
+    m_Target: {x: 0.36108032, y: 1.522962, z: 0.7288684}
     speed: 2
-    m_Value: {x: 0.053652834, y: -0.41136077, z: 0.7194671}
+    m_Value: {x: 0.36108032, y: 1.522962, z: 0.7288684}
   m_RenderMode: 0
   m_CameraMode:
     drawMode: 0
@@ -917,9 +917,9 @@ MonoBehaviour:
     speed: 2
     m_Value: {x: 0, y: 0, z: 0, w: 1}
   m_Size:
-    m_Target: 2.1377425
+    m_Target: 1.197603
     speed: 2
-    m_Value: 2.1377425
+    m_Value: 1.197603
   m_Ortho:
     m_Target: 1
     speed: 2
@@ -985,23 +985,23 @@ MonoBehaviour:
     m_SkipHidden: 0
     m_SearchArea: 1
     m_Folders:
-    - Assets/Plugins
+    - Assets/StreamingAssets
     m_Globs: []
     m_OriginalText: 
     m_FilterByTypeIntersection: 0
   m_ViewMode: 1
   m_StartGridSize: 16
   m_LastFolders:
-  - Assets/Plugins
+  - Assets/StreamingAssets
   m_LastFoldersGridSize: 16
   m_LastProjectPath: E:\Project\Unity\bt_client_2022_S
   m_LockTracker:
     m_IsLocked: 0
   m_FolderTreeState:
-    scrollPos: {x: 0, y: 194}
-    m_SelectedIDs: 2c3f0800
-    m_LastClickedID: 540460
-    m_ExpandedIDs: 00000000cc5e0000ce5e0000d05e0000d25e0000d45e0000d65e0000d85e0000da5e0000dc5e0000de5e0000e05e0000e25e0000e45e0000e65e0000e85e0000ea5e0000ec5e0000ee5e0000f05e0000f25e0000f45e0000f65e0000f85e000000ca9a3b
+    scrollPos: {x: 0, y: 62}
+    m_SelectedIDs: 36610000
+    m_LastClickedID: 24886
+    m_ExpandedIDs: 00000000f05e0000f25e0000f45e0000f65e0000f85e0000fa5e0000fc5e0000fe5e0000005f0000325f000000ca9a3b
     m_RenameOverlay:
       m_UserAcceptedRename: 0
       m_Name: 
@@ -1029,7 +1029,7 @@ MonoBehaviour:
     scrollPos: {x: 0, y: 0}
     m_SelectedIDs: 
     m_LastClickedID: 0
-    m_ExpandedIDs: 00000000cc5e0000ce5e0000d05e0000d25e0000d45e0000d65e0000d85e0000da5e0000dc5e0000de5e0000e05e0000e25e0000e45e0000e65e0000e85e0000ea5e0000ec5e0000ee5e0000f05e0000f25e0000f45e0000f65e0000f85e0000
+    m_ExpandedIDs: 00000000ee5e0000f05e0000f25e0000f45e0000f65e0000f85e0000fa5e0000fc5e0000fe5e0000005f0000
     m_RenameOverlay:
       m_UserAcceptedRename: 0
       m_Name: