public static void LocalizeAllMyLocalization() { MyLocalizationManager script = GameObject.FindObjectOfType <MyLocalizationManager>(); if (script != null) { script.LoadLanguage(script.Language, true); } MyLocalization[] scripts = GameObject.FindObjectsOfType <MyLocalization>(); foreach (var item in scripts) { item.Initialize(); item.Localize(); } Debug.Log("[MyClasses] All " + typeof(MyLocalization).Name + "s in scene were lozalized."); }
public static void CreateMyLocalizationManager() { MyLocalizationManager script = GameObject.FindObjectOfType <MyLocalizationManager>(); if (script != null) { EditorGUIUtility.PingObject(script); Selection.activeGameObject = script.gameObject; Debug.Log("[MyClasses] " + typeof(MyLocalizationManager).Name + " is existed."); } else { MyLocalizationManager.CreateTemplate(); Debug.Log("[MyClasses] " + typeof(MyLocalizationManager).Name + " was created."); } }