Browse Source

更新提示

guodong 1 year ago
parent
commit
1706428f04

+ 2 - 0
GameClient/Assets/Game/Launcher/LauncherConfig.cs

@@ -39,6 +39,7 @@ namespace GFGGame
         public static string statusPrompt;
         public static string statusPrompt;
         public static string updateAppPrompt;
         public static string updateAppPrompt;
         public static string updateResPrompt;
         public static string updateResPrompt;
+        public static int promptSizeMB;
 
 
         public static void InitScriptCompilation()
         public static void InitScriptCompilation()
         {
         {
@@ -82,6 +83,7 @@ namespace GFGGame
             LauncherConfig.statusPrompt = result.statusPrompt;
             LauncherConfig.statusPrompt = result.statusPrompt;
             LauncherConfig.updateAppPrompt = result.updateAppPrompt;
             LauncherConfig.updateAppPrompt = result.updateAppPrompt;
             LauncherConfig.updateResPrompt = result.updateResPrompt;
             LauncherConfig.updateResPrompt = result.updateResPrompt;
+            LauncherConfig.promptSizeMB = int.Parse(result.promptSizeMB);
         }
         }
 
 
         private struct Result
         private struct Result

+ 1 - 1
GameClient/Assets/Game/Launcher/Version/VersionController.cs

@@ -135,7 +135,7 @@ namespace GFGGame
                 long totalDownloadBytes = downloaderOperation.TotalDownloadBytes;
                 long totalDownloadBytes = downloaderOperation.TotalDownloadBytes;
                 float sizeMB = totalDownloadBytes / 1048576f;
                 float sizeMB = totalDownloadBytes / 1048576f;
                 sizeMB = Mathf.Clamp(sizeMB, 0.1f, float.MaxValue);
                 sizeMB = Mathf.Clamp(sizeMB, 0.1f, float.MaxValue);
-                if(sizeMB > 10)
+                if(sizeMB > LauncherConfig.promptSizeMB)
                 {
                 {
                     string totalSizeMB = sizeMB.ToString("f1");
                     string totalSizeMB = sizeMB.ToString("f1");
                     if(string.IsNullOrEmpty(LauncherConfig.updateResPrompt))
                     if(string.IsNullOrEmpty(LauncherConfig.updateResPrompt))