Example #1
0
    private void OnGUI()
    {
        // set localizedText
        if (localizationText == null)
        {
            localizationText = Resources.Load <LocalizationText>(ScriptableObjectConstant.localizedTextPath);
            localizationText.unloadLocalizationData();
            localizationText.loadBaseLanguage();
        }

        localizationText = (LocalizationText)EditorGUILayout.ObjectField(localizationText, typeof(LocalizationText), false);

        currentTab = GUILayout.Toolbar(currentTab, new string[] { "Edit Languages", "Add / Remove Keys", "Add languages" });
        EditorGUILayout.Space();
        switch (currentTab)
        {
        case 0: languagesEditor.init(localizationText);; break;

        case 1: newLocalizationKeyEditor.init(localizationText);; break;

        case 2: newLanguageEditor.init(localizationText);  break;
        }
    }