private void RemoveLanguage(SimpleLanguageData languageData)
 {
     if (EditorUtility.DisplayDialog("Deleting language",
                                     string.Format("Confirm {0} language deletion.", languageData.Language.Name), "Delete", "Cancel"))
     {
         CurrentConfig.Languages.Remove(languageData);
         AssetDatabase.RemoveObjectFromAsset(languageData);
         EditorUtility.SetDirty(CurrentConfig);
         AssetDatabase.SaveAssets();
     }
 }
예제 #2
0
 public static void ShowWindow(SimpleLanguageData languageData = null)
 {
     if (languageData == null)
     {
         var window = GetWindow <SimpleLanguageEditWindow>("Creating Language");
         window._isNew = true;
         window._currentLanguageData          = ScriptableObject.CreateInstance <SimpleLanguageData>();
         window._currentLanguageData.Language = new Language();
     }
     else
     {
         var window = GetWindow <SimpleLanguageEditWindow>(string.Format("Editing: {0}", languageData.Language.Name));
         window._currentLanguageData = languageData;
     }
 }
 private void EditOrCreateLanguage(SimpleLanguageData languageData = null)
 {
     SimpleLanguageEditWindow.ShowWindow(languageData);
 }
 private void SetDefeaultLanguage(SimpleLanguageData languageData)
 {
     CurrentConfig.DefaultLanguage = languageData;
     EditorUtility.SetDirty(CurrentConfig);
     AssetDatabase.SaveAssets();
 }
예제 #5
0
 private void OnEnable()
 {
     _languageData = (SimpleLanguageData)target;
 }