Пример #1
0
    public override void OnInspectorGUI()
    {
        base.OnInspectorGUI();

        serializedObject.Update();

        EditorGUI.indentLevel--;
        AllGameLanguagesEditor.createCurrentGameLanguageBox();
        EditorGUI.indentLevel++;

        if (monoLT.localizedText != null)
        {
            if (localizedTextEditor == null)
            {
                localizedTextEditor            = CreateEditor(monoLT.localizedText) as LocalizedTextEditor;
                localizedTextEditor.editorType = LocalizedTextEditor.EditorType.INSPECTOR;
            }

            localizedTextEditor.OnInspectorGUI();
        }

        serializedObject.ApplyModifiedProperties();
    }
Пример #2
0
    private void drawLocalizationTab()
    {
        currentLocalizationTabOption = GUILayout.Toolbar(currentLocalizationTabOption, new string[] { "Master Control", "Localized Text Groups" }, GUILayout.MinWidth(100));

        if (currentLocalizationTabOption == 0)
        {
            if (!AllGameLanguages.Instance)
            {
                EditorTools.drawMessage("AllGameLanguages has not been created yet.", MessageType.Info);
                if (EditorTools.createListButton("Create AllGameLanguages Object", false))
                {
                    AllGameLanguagesEditor.CreateAllGameLanguagesAsset();
                }
            }
            else
            {
                Editor.CreateEditor(AllGameLanguages.Instance).OnInspectorGUI();
            }
        }
        else
        {
            drawVariablesSubWindow <LocalizedTextsGroup>("Localized Texts Groups", ref newElementName, LocalizedTextsGroupEditor.BASE_PATH, ref selectedIndex);
        }
    }