*Solved* Loop instantiating objects causes my Unity Editor to crash

*Solved: Didn’t proofread my for loop enough times

Hi everyone,
I have been looking for a solution to this, or even an explanation to the cause of my problem for a while now. When I run the following script in Unity the Editor hangs up/crashes on me every single time.

public class LevelManager : MonoBehaviour
{
    public LevelManager()
    {
    }

    public void NewLevel()
    {
        var newSprite = CreateTile(Resources.Load<Sprite>("Sprites/grass_1"));
        for (var i = 0; i < 10; i++)
        {
            for (var j = 0; i < 10; j++)
            {
                    Instantiate(newSprite, new Vector3(i, j, 0), default(Quaternion));
            }
        }
    }

    private GameObject CreateTile(Sprite tileSprite)
    {
        var newTile = (GameObject) Resources.Load("Tiles/basicTile");
        var g = newTile.transform.Find("material").GetComponent<SpriteRenderer>().sprite = tileSprite;
        return (GameObject) newTile;
    }
}

If I take away the for loop (changing i and j to some integer) I do not have an issue and my object renders just fine. Can anybody explain this to me?

Did you mean to have “i<10” on line 12?