Example #1
0
        public override void OnInspectorGUI()
        {
            if (_rootLines.Length == 0)
            {
                EditorGUILayout.LabelField("No Labels set in the label file", EditorStyles.boldLabel);
                if (GUILayout.Button("Open Localization Editor Window"))
                {
                    CustomEditorWindow_Localizator.OpenWindow();
                }
            }
            else
            {
                string value = EditorGUILayout.TextField("Current Fragment :", _target._fragmentInternal);
                if (!_target._fragmentInternal.Equals(value))
                {
                    _target._fragmentInternal = value;

                    if (Application.isPlaying)
                    {
                        _target.OnChangeLanguage();
                    }
                    else
                    {
                        //_target.GetComponent<Text>().text = "<" + _target.Fragment + ">";
                        _target.gameObject.SetActive(false);
                        _target.gameObject.SetActive(true);
                    }
                }
            }
        }