Hello! when try to run this code: My computer crash!
Wath can I do?
public class GridSystemVisualSIngle : MonoBehaviour
{
[SerializeField] Transform gridVisualSystemSIngle;
private void Start()
{
for (int x = 0; x < LevelGrid.Instance.GetWidth(); x++)
{
for (int z = 0; z < LevelGrid.Instance.GetHeigth(); z++)
{
GridPosition gridPosition = new GridPosition(x, z);
Instantiate(gridVisualSystemSIngle, LevelGrid.Instance.GetWorldPosition(gridPosition), Quaternion.identity);
}
}
}
}