Exemplo n.º 1
0
        void OnImported_Google(string Result, string Error, eSpreadsheetUpdateMode UpdateMode)
        {
            if (!string.IsNullOrEmpty(Error))
            {
                Debug.Log(Error);
                ShowError("Unable to access google");
                return;
            }
            LanguageSource source    = ((LanguageSource)target);
            string         ErrorMsg  = source.Import_Google_Result(Result, UpdateMode);
            bool           HasErrors = !string.IsNullOrEmpty(ErrorMsg);

            if (HasErrors)
            {
                ShowError(ErrorMsg);
            }

            serializedObject.Update();
            ParseTerms(true, !HasErrors);
            mSelectedKeys.Clear();
            mSelectedCategories.Clear();
            ScheduleUpdateTermsToShowInList();
            mLanguageSource.GetCategories(false, mSelectedCategories);

            EditorUtility.SetDirty(target);
            AssetDatabase.SaveAssets();
        }