Hello people! I am new to programming and I ask a strength.
I have a little problem in my code.
The idea of my code is to generate a list showing the strings of an array by means of a GUI.Label.
Example: I have an array which is as follows:
C #
public static List list = new
List ();
I inserted four values in this array, thus;
list [0] = “Diego”;
list [1] = “Henrique”;
list [2] = “Pereira”;
list [3] = “Marinho”;
for me to print on the screen I used a for loop
OnGUI value () {
for (int i = 0; i <= list.Count -1; ++ i) {
Debug.log (Publicas.list );
GUI.Label (new Rect (lx * Screen.Width / 2,
(Screen.Height / 7) + i * ly * Screen.Height,
* Screen.Width lw, lh * Screen.Height)
Publicas.list text);
}
It wanted from printing only these four values and stop. But it prints these four backlight values and for printing them, printing them is infinitely;
Could anyone help me?
I thank your attention!
Below are the print of my code and the error that appears in the console
[30601-codigo1.jpg|30601]_
_[30602-codigo2.jpg*|30602]*
_*
_*