From fdf698f0b947795dc1041017a9ec5fd45dcd507b Mon Sep 17 00:00:00 2001 From: Nam Tae Gun Date: Fri, 29 Nov 2024 08:20:42 +0900 Subject: [PATCH] 0.3.4.23 --- Assets/02.Scripts/LocalizationManager.cs | 20 +++++++++++++++++++ .../Managers/LocalizationManager.prefab | 2 ++ Assets/10.Fonts/Hahmlet-Medium SDF.asset | 2 +- ProjectSettings/ProjectSettings.asset | 2 +- 4 files changed, 24 insertions(+), 2 deletions(-) diff --git a/Assets/02.Scripts/LocalizationManager.cs b/Assets/02.Scripts/LocalizationManager.cs index c0c476476..96413940a 100644 --- a/Assets/02.Scripts/LocalizationManager.cs +++ b/Assets/02.Scripts/LocalizationManager.cs @@ -1,6 +1,7 @@ using System; using System.Collections; using Sirenix.OdinInspector; +using UnityEngine; using UnityEngine.Localization.Settings; namespace BlueWater @@ -16,8 +17,13 @@ namespace BlueWater public class LocalizationManager : Singleton { public bool IsInitialized; + + [SerializeField] + private Material _defaultFontMaterial; private bool _isChanging; + + private static readonly int OutlineWidthHash = Shader.PropertyToID("_OutlineWidth"); private void Start() { @@ -44,6 +50,15 @@ namespace BlueWater yield return LocalizationSettings.InitializationOperation; LocalizationSettings.SelectedLocale = LocalizationSettings.AvailableLocales.Locales[(int)localeType]; + + if (localeType == LocaleType.ChineseSimplified) + { + SetMaterialOutline(0.1f); + } + else + { + SetMaterialOutline(0.2f); + } ES3.Save(SaveData.Locale, (int)localeType); _isChanging = false; @@ -76,5 +91,10 @@ namespace BlueWater _ => "Unknown" }; } + + public void SetMaterialOutline(float value) + { + _defaultFontMaterial.SetFloat(OutlineWidthHash, value); + } } } diff --git a/Assets/05.Prefabs/Managers/LocalizationManager.prefab b/Assets/05.Prefabs/Managers/LocalizationManager.prefab index a65ad05a7..5c9fa6688 100644 --- a/Assets/05.Prefabs/Managers/LocalizationManager.prefab +++ b/Assets/05.Prefabs/Managers/LocalizationManager.prefab @@ -45,3 +45,5 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: _persistent: 1 + IsInitialized: 0 + _defaultFontMaterial: {fileID: 2060004501589314750, guid: ab4e9b009d1d8c9499121e92eff6464d, type: 2} diff --git a/Assets/10.Fonts/Hahmlet-Medium SDF.asset b/Assets/10.Fonts/Hahmlet-Medium SDF.asset index 51d6729bb..73d8417a7 100644 --- a/Assets/10.Fonts/Hahmlet-Medium SDF.asset +++ b/Assets/10.Fonts/Hahmlet-Medium SDF.asset @@ -74710,7 +74710,7 @@ Material: - _OutlineSoftness: 0 - _OutlineUVSpeedX: 0 - _OutlineUVSpeedY: 0 - - _OutlineWidth: 0.15 + - _OutlineWidth: 0.1 - _PerspectiveFilter: 0.875 - _Reflectivity: 10 - _ScaleRatioA: 0.8 diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 771a61d54..8eeb51df8 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -140,7 +140,7 @@ PlayerSettings: loadStoreDebugModeEnabled: 0 visionOSBundleVersion: 1.0 tvOSBundleVersion: 1.0 - bundleVersion: 0.3.4.22 + bundleVersion: 0.3.4.23 preloadedAssets: - {fileID: -944628639613478452, guid: 4ed6540e2f7ce234888adf8deff1f241, type: 3} - {fileID: 11400000, guid: 112e4950c7d9b7a429feb9bb058a93a7, type: 2}