lvjincheng 2 vuotta sitten
vanhempi
sitoutus
861ffa1700

+ 9 - 10
Assets/BowArrow/Scripts/Editor/MenuChangeAppLanguage.cs

@@ -16,11 +16,11 @@ public class MenuChangeAppLanguage
         PlayerSettings.productName = CommonConfig.AppNames[0];
         #if UNITY_IOS
         PlayerSettings.SetApplicationIdentifier(BuildTargetGroup.iOS, "com.xmjssvr.BowArrow");
-        SetIosAppIcon(false);
         #endif
         #if UNITY_ANDROID
         PlayerSettings.SetApplicationIdentifier(BuildTargetGroup.Android, "com.xmjssvr.BowArrow.mi");
         #endif
+        SetIosAppIcon(0);
     }
 
     [MenuItem("APP语言版本切换/中文", true)]
@@ -36,11 +36,11 @@ public class MenuChangeAppLanguage
         PlayerSettings.productName = CommonConfig.AppNames[1];
         #if UNITY_IOS
         PlayerSettings.SetApplicationIdentifier(BuildTargetGroup.iOS, "com.xmjssvr.BowArrowEn");
-        SetIosAppIcon(true);
         #endif
         #if UNITY_ANDROID
         PlayerSettings.SetApplicationIdentifier(BuildTargetGroup.Android, "com.xmjssvr.BowArrowEn");
         #endif
+        SetIosAppIcon(1);
     }
 
     [MenuItem("APP语言版本切换/英文", true)]
@@ -50,17 +50,16 @@ public class MenuChangeAppLanguage
         return true;
     }
 
-    static void SetIosAppIcon(bool en)
+    static void SetIosAppIcon(int id)
     {
-        Texture2D texture = null;
-        if (en) {
-            texture = AssetDatabase.LoadAssetAtPath(
-                "Assets/BowArrow/Textures/Common/AppIconEN.png", typeof(Texture2D)) as Texture2D;
+        string path = "Assets/BowArrow/Textures/Common/AppIcon2.png";
+        if (id == 1) {
+            path = "Assets/BowArrow/Textures/Common/AppIconEN.png";
         }
-        int[] iconSize = PlayerSettings.GetIconSizesForTargetGroup(BuildTargetGroup.iOS);
-        Texture2D[] textureArray = new Texture2D[iconSize.Length];
+        Texture2D texture = AssetDatabase.LoadAssetAtPath(path, typeof(Texture2D)) as Texture2D;
+        Texture2D[] textureArray = PlayerSettings.GetIconsForTargetGroup(BuildTargetGroup.Unknown);
         for (int i = 0; i < textureArray.Length; i++) textureArray[i] = texture;
-        PlayerSettings.SetIconsForTargetGroup(BuildTargetGroup.iOS, textureArray);
+        PlayerSettings.SetIconsForTargetGroup(BuildTargetGroup.Unknown, textureArray);
         AssetDatabase.SaveAssets();
     }
 }

BIN
Assets/BowArrow/Textures/Common/AppIconEN.png


+ 52 - 1
Assets/BowArrow/Textures/Common/AppIconEN.png.meta

@@ -3,7 +3,7 @@ guid: 5a86b450fbbf31f4d9269beac3ccd441
 TextureImporter:
   internalIDToNameTable: []
   externalObjects: {}
-  serializedVersion: 11
+  serializedVersion: 12
   mipmaps:
     mipMapMode: 0
     enableMipMap: 1
@@ -24,6 +24,7 @@ TextureImporter:
   streamingMipmaps: 0
   streamingMipmapsPriority: 0
   vTOnly: 0
+  ignoreMasterTextureLimit: 0
   grayScaleToAlpha: 0
   generateCubemap: 6
   cubemapConvolution: 0
@@ -62,12 +63,61 @@ TextureImporter:
   textureFormatSet: 0
   ignorePngGamma: 0
   applyGammaDecoding: 0
+  cookieLightType: 1
   platformSettings:
   - serializedVersion: 3
     buildTarget: DefaultTexturePlatform
     maxTextureSize: 2048
     resizeAlgorithm: 0
     textureFormat: -1
+    textureCompression: 0
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
+  - serializedVersion: 3
+    buildTarget: Standalone
+    maxTextureSize: 2048
+    resizeAlgorithm: 0
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
+  - serializedVersion: 3
+    buildTarget: Server
+    maxTextureSize: 2048
+    resizeAlgorithm: 0
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
+  - serializedVersion: 3
+    buildTarget: Android
+    maxTextureSize: 2048
+    resizeAlgorithm: 0
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
+  - serializedVersion: 3
+    buildTarget: iPhone
+    maxTextureSize: 2048
+    resizeAlgorithm: 0
+    textureFormat: -1
     textureCompression: 1
     compressionQuality: 50
     crunchedCompression: 0
@@ -88,6 +138,7 @@ TextureImporter:
     edges: []
     weights: []
     secondaryTextures: []
+    nameFileIdTable: {}
   spritePackingTag: 
   pSDRemoveMatte: 0
   pSDShowRemoveMatteOption: 0