This commit is contained in:
Nam Tae Gun 2024-11-29 08:20:42 +09:00
parent 9a70355b61
commit fdf698f0b9
4 changed files with 24 additions and 2 deletions

View File

@ -1,6 +1,7 @@
using System;
using System.Collections;
using Sirenix.OdinInspector;
using UnityEngine;
using UnityEngine.Localization.Settings;
namespace BlueWater
@ -17,8 +18,13 @@ namespace BlueWater
{
public bool IsInitialized;
[SerializeField]
private Material _defaultFontMaterial;
private bool _isChanging;
private static readonly int OutlineWidthHash = Shader.PropertyToID("_OutlineWidth");
private void Start()
{
var index = ES3.Load(SaveData.Locale, GetCurrentLocaleIndex());
@ -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);
}
}
}

View File

@ -45,3 +45,5 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
_persistent: 1
IsInitialized: 0
_defaultFontMaterial: {fileID: 2060004501589314750, guid: ab4e9b009d1d8c9499121e92eff6464d, type: 2}

View File

@ -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

View File

@ -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}