In this unity tutorial learn how to spawn a grid in C#. We will use nested for loops in C# to create a grid that could be used in procedural generation, grid based or turn based games in Unity. We are showing a 3D grid example made out of cubes but the same code will also work for spawning a 2D grid. This tutorial is created in Unity 2019 but will also work in older versions of Unity.