For loop to print some values

Hello community.

I want to print out some values while inside a for loop, but the loop gets done without printing those values. This is the code:

		for(int i = 0; i < 15; i++)
		{
			for(int j = 0; j < 15; j++)
			{
				Debug.Log("i: " + i.ToString() + ", j: " + j.ToString());
			}
		}

My output should read:

i: 0, j: 0
i: 0, j: 1
i: 0, j: 2

i: 14, j: 14

The code gets compiled without errors and runs, but no printout. Any clues at how can I do this?

Thanks!

That seems to work fine for me. I get the read out no problem. I’m not sure what your problem could be. It also works without the ‘ToString’ too.

If this is a cut down version of your code, maybe try posting up your more complicated version?

	void Start () 
	{
		TestLoop ();
	}

	void TestLoop ()
	{
		for(int i = 0; i < 15; i++)
		{
			for(int j = 0; j < 15; j++)
			{
				Debug.Log ("i: " + i + ", j: " + j);
			}
		}
	}