예제 #1
0
    public override void OnInspectorGUI()
    {
        EditorGUILayout.LabelField("");

        XlsReader script = target as XlsReader;

        #region Idioma
        /////////////w/////////////////////////////////////////////////////////////////////

        /*EditorGUILayout.LabelField("Idioma");
         * script.idioma = EditorGUILayout.Popup(script.idioma, idioma);*/
        ///////////////////////////////////////////////////////////////////////////////
        #endregion

        #region Contexto
        EditorGUILayout.LabelField("");
        EditorGUILayout.LabelField("Contexto");
        script.contexto = EditorGUILayout.Popup(script.contexto, contexto);
        #endregion

        #region busqueda
        EditorGUILayout.LabelField("");
        EditorGUILayout.LabelField("ID de Texto");
        script.idKey = EditorGUILayout.TextField(script.idKey);
        if (GUILayout.Button("Buscar ID"))
        {
            Debug.Log(script.Search(Application.dataPath + "/Textos.xlsx"));
        }

        #endregion
    }
예제 #2
0
    public void Presionado()
    {
        PlayerPrefs.SetInt("Idioma", Idioma);
        XlsReader reader = FindObjectOfType(typeof(XlsReader)) as XlsReader;

        texto.text = reader.Search(Application.dataPath + "/Textos.xlsx");
        print("Click");
        print(PlayerPrefs.GetInt("Idioma"));
    }