void OnKeySet(string languageCode, LocalizationKey changedKey) { if (changedKey.key == targetKey) { UpdateLocalizeText(); } }
public string GetText(string key) { LocalizationKey lk = GetLocalizationKey(key); if (lk != null) { return(lk.textValue); } else { return(""); } }
public void RemoveKey(string key) { LocalizationKey lk = GetLocalizationKey(key); if (lk != null) { keys.Remove(lk); } #if UNITY_EDITOR EditorUtility.SetDirty(this); #endif }
public void SetKey(string key, string textValue) { LocalizationKey lk = GetLocalizationKey(key); if (lk == null) { keys.Add(new LocalizationKey(key, textValue)); } else { lk.textValue = textValue; } #if UNITY_EDITOR EditorUtility.SetDirty(this); #endif if (!Application.isPlaying && OnKeySet != null) { OnKeySet(code, new LocalizationKey(key, textValue)); } }