Error showing data in a Grid layout group

0

I'm wanting to show a list of data obtained from the database the query and I tried it and it is correct since I print it in the console but at the time of showing them I get the following

I have in a class that is where the text obtained from the database is supposed to be assigned     public GameObject number;         public GameObject question;         public GameObject answer;

    public void ponerEjercicios(string num, string preg, string resp)
    {
        this.numero.GetComponent<Text>().text = num;
        this.pregunta.GetComponent<Text>().text = preg;
        this.respuesta.GetComponent<Text>().text = resp;
    }

In this method I get from the database and I try to put it in the group

ejercicios();
        for (int i = 0; i < preguntas.Count; i++)
        {
            GameObject tempPrefab = Instantiate(preguntasPrefabs);
            tempPrefab.transform.SetParent(preguntasPadre);
            MostrarPreguntas mostrarTemp = preguntas[i];
            tempPrefab.GetComponent<AllPreguntas>().ponerEjercicios("#"+(i+1).ToString(),
                mostrarTemp.Pregunta, mostrarTemp.Respuesta);
            Debug.Log("#"+ (i + 1)+" "+ mostrarTemp.Pregunta+"  "+ mostrarTemp.Respuesta);
        }
    
asked by Richard Yordy 25.10.2018 в 23:51
source

0 answers