CallbackNotification.cs 439 B

123456789101112131415161718
  1. using System;
  2. using UnityEngine;
  3. namespace I2.Loc
  4. {
  5. public class CallbackNotification : MonoBehaviour
  6. {
  7. public void OnModifyLocalization()
  8. {
  9. if (string.IsNullOrEmpty(Localize.MainTranslation))
  10. {
  11. return;
  12. }
  13. string translation = LocalizationManager.GetTranslation("Color/Red", true, 0, true, false, null, null);
  14. Localize.MainTranslation = Localize.MainTranslation.Replace("{PLAYER_COLOR}", translation);
  15. }
  16. }
  17. }