im trying to solve a very special issue, may one of you have a similar problem, I'll extend the class TextMeshProUGUI from Unity's package manager just for add a simple string extra property for localization called m_key for those who will use this GameObject only have to put the key for the localized string on the editor and check how it looks like the TMPro text with the localized string, ok, i'll copy all the custom TextMeshPro editor in a new editor class just for show the localized text in the unity editor with the next code on the OnInspectorGUI function:
m_key = EditorGUILayout.TextField(new GUIContent("LOCALIZED KEY:"), localized_key.stringValue, GUILayout.Height(18), GUILayout.ExpandWidth(true));
localized_key.stringValue = m_key;
text_prop.stringValue = LanguageWizard.GetGameText(localized_key.stringValue);
Where m_key its just a string variable in the editor class and localized_key comes from the property m_key on the extended class and at this point actually works well, but the issue is when in the Unity Editor try to deactivate the game object or its parent, the parent hides, the TMPro hides but the text property is still visible in the editor while the normal editor behaviour its hiding, may be i mess a little with custom editor of the TMPro, but if some one has experienced some of this please help.
OnInspectorGUI
has actually nothing to do withGizmos
... – derHugo