优化语言

This commit is contained in:
“虞渠成” 2026-07-03 11:16:21 +08:00
parent d8537859d1
commit 4f3b9380d9
3 changed files with 25 additions and 15 deletions

View File

@ -41,6 +41,10 @@ namespace Kill.Managers
/// </summary> /// </summary>
public void SetLanguageBySystem() public void SetLanguageBySystem()
{ {
int type = PlayerPrefs.GetInt("LanguageType");
if (type==0)
{
SystemLanguage systemLanguage = Application.systemLanguage; SystemLanguage systemLanguage = Application.systemLanguage;
Debug.Log($"系统语言: {systemLanguage}"); Debug.Log($"系统语言: {systemLanguage}");
@ -57,6 +61,11 @@ namespace Kill.Managers
Debug.Log("设置语言为: 英文"); Debug.Log("设置语言为: 英文");
} }
} }
else
{
languageType = (LanguageType)type-1;
}
}
/// <summary> /// <summary>
/// 手动设置语言 /// 手动设置语言
@ -65,6 +74,7 @@ namespace Kill.Managers
{ {
languageType = type; languageType = type;
Debug.Log($"手动设置语言为: {type}"); Debug.Log($"手动设置语言为: {type}");
PlayerPrefs.SetInt("LanguageType",(int)type+1);
} }
public async Task Init() public async Task Init()
{ {

View File

@ -178,7 +178,7 @@ PlayerSettings:
tvOS: 0 tvOS: 0
overrideDefaultApplicationIdentifier: 0 overrideDefaultApplicationIdentifier: 0
AndroidBundleVersionCode: 1 AndroidBundleVersionCode: 1
AndroidMinSdkVersion: 31 AndroidMinSdkVersion: 33
AndroidTargetSdkVersion: 0 AndroidTargetSdkVersion: 0
AndroidPreferredInstallLocation: 0 AndroidPreferredInstallLocation: 0
aotOptions: aotOptions:
@ -276,8 +276,8 @@ PlayerSettings:
AndroidTargetDevices: 1 AndroidTargetDevices: 1
AndroidSplashScreenScale: 0 AndroidSplashScreenScale: 0
androidSplashScreen: {fileID: 2800000, guid: 1a5a9a597e39ce24d8f68081cd7c76e5, type: 3} androidSplashScreen: {fileID: 2800000, guid: 1a5a9a597e39ce24d8f68081cd7c76e5, type: 3}
AndroidKeystoreName: AndroidKeystoreName: '{inproject}: user.keystore'
AndroidKeyaliasName: AndroidKeyaliasName: photonmatrix
AndroidEnableArmv9SecurityFeatures: 0 AndroidEnableArmv9SecurityFeatures: 0
AndroidBuildApkPerCpuArchitecture: 0 AndroidBuildApkPerCpuArchitecture: 0
AndroidTVCompatibility: 0 AndroidTVCompatibility: 0
@ -285,14 +285,14 @@ PlayerSettings:
AndroidEnableTango: 0 AndroidEnableTango: 0
androidEnableBanner: 1 androidEnableBanner: 1
androidUseLowAccuracyLocation: 0 androidUseLowAccuracyLocation: 0
androidUseCustomKeystore: 0 androidUseCustomKeystore: 1
m_AndroidBanners: m_AndroidBanners:
- width: 320 - width: 320
height: 180 height: 180
banner: {fileID: 0} banner: {fileID: 0}
androidGamepadSupportLevel: 0 androidGamepadSupportLevel: 0
chromeosInputEmulation: 1 chromeosInputEmulation: 1
AndroidMinifyRelease: 0 AndroidMinifyRelease: 1
AndroidMinifyDebug: 0 AndroidMinifyDebug: 0
AndroidValidateAppBundleSize: 1 AndroidValidateAppBundleSize: 1
AndroidAppBundleSizeToValidate: 200 AndroidAppBundleSizeToValidate: 200

BIN
user.keystore Normal file

Binary file not shown.