RegisterGlobalParameters.cs 527 B

123456789101112131415161718192021222324252627
  1. using System;
  2. using UnityEngine;
  3. namespace I2.Loc
  4. {
  5. public class RegisterGlobalParameters : MonoBehaviour, ILocalizationParamsManager
  6. {
  7. public virtual void OnEnable()
  8. {
  9. if (!LocalizationManager.ParamManagers.Contains(this))
  10. {
  11. LocalizationManager.ParamManagers.Add(this);
  12. LocalizationManager.LocalizeAll(true);
  13. }
  14. }
  15. public virtual void OnDisable()
  16. {
  17. LocalizationManager.ParamManagers.Remove(this);
  18. }
  19. public virtual string GetParameterValue(string ParamName)
  20. {
  21. return null;
  22. }
  23. }
  24. }