internal static string GetLocalizationParam(string ParamName, GameObject root) { string text = null; if ((bool)root) { MonoBehaviour[] components = root.GetComponents <MonoBehaviour>(); int i = 0; for (int num = components.Length; i < num; i++) { ILocalizationParamsManager localizationParamsManager = components[i] as ILocalizationParamsManager; if (localizationParamsManager != null) { text = localizationParamsManager.GetParameterValue(ParamName); if (text != null) { return(text); } } } } int j = 0; for (int count = ParamManagers.Count; j < count; j++) { text = ParamManagers[j].GetParameterValue(ParamName); if (text != null) { return(text); } } return(null); }
//================= public static void ApplyLocalizationParams(ref string translation, ILocalizationParamsManager ParamManager, bool allowLocalizedParameters = true) { ApplyLocalizationParams(ref translation, (p) => { return(ParamManager.GetParameterValue(p)); } , allowLocalizedParameters); }