|
|
@@ -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();
|
|
|
}
|
|
|
}
|