public override void OnInspectorGUI() { DialogResponse myTarget = (DialogResponse)target; Lang defaultLanguage; DrawDefaultInspector(); // once the variable name has been filled in provide the option to add text to the default language if (myTarget.responseVariable != null && myTarget.responseVariable != "") { defaultLanguage = myTarget.localizationController.defaultLanguage; // provides the ability to add a variable to the default messages file automatically EditorGUILayout.PrefixLabel("Add a new Variable:"); EditorGUI.indentLevel++; defaultText = EditorGUILayout.TextField("Default Lang Text", defaultText); EditorGUILayout.HelpBox( "The variable with name: " + myTarget.responseVariable + " and the provided text will be added to the default language: " + defaultLanguage.language, MessageType.Info ); if (GUILayout.Button("Add")) { LocalizedTextEditor.addVariableToDefaultLanguageFile( myTarget.localizationController, defaultLanguage, myTarget.responseVariable, defaultText ); } } }
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(); }