예제 #1
0
    public override void OnInspectorGUI()
    {
        //DrawDefaultInspector ();
        script.Update();
        EditorGUI.BeginChangeCheck();
        this.languageControl.polyglot = AssetDatabase.LoadAssetAtPath <PolyglotSave>(languageControl.GetSaveLocalPath());

        languageControl.selectedLanguage = EditorGUILayout.Popup("Selected Languages: ", languageControl.selectedLanguage, languageControl.polyglot.languages.ToArray());
        EditorGUILayout.PropertyField(LanguageChanged);

        if (EditorGUI.EndChangeCheck())
        {
            script.ApplyModifiedProperties();
        }
    }
예제 #2
0
    public void OnEnable()
    {
        languageControl = (LanguageControl)target;
        script          = new SerializedObject(target);

        if (languageControl.polyglot == null)
        {
            this.languageControl.polyglot = AssetDatabase.LoadAssetAtPath <PolyglotSave>(languageControl.GetSaveLocalPath());
        }

        LanguageChanged = script.FindProperty("LanguageChanged");
    }