SamsonGame/Assets/Sources/I2/Localization/Examples/Common/Scripts/CallbackNotification.cs

18 lines
392 B
C#
Raw Normal View History

2021-12-29 20:50:11 +03:00
using UnityEngine;
namespace I2.Loc
{
public class CallbackNotification : MonoBehaviour
{
public void OnModifyLocalization()
{
if (string.IsNullOrEmpty(Localize.MainTranslation))
return;
string PlayerColor = LocalizationManager.GetTranslation( "Color/Red" );
Localize.MainTranslation = Localize.MainTranslation.Replace("{PLAYER_COLOR}", PlayerColor);
}
}
}