public void PrintBoard()
{
    StringBuilder sb = new StringBuilder();
    for (int i = 0; i < board.GetLength(0); i++)    //행
    {
        for (int j = 0; j < board.GetLength(1); j++)    //열
        {
            Block block = board[i, j];
            string strElement = (block == null) ? "null" : block.blockType.ToString();
            // 각 엘리먼트를 고정된 너비로 출력
            sb.AppendFormat("[{0},{1}] = {2,-11}", i, j, strElement);
        }
        sb.AppendLine();
    }
    Debug.Log(sb.ToString());
}

 

완벽히 원하는 간격은 아니였으나 계속 물은 끝에 이 정도의 결과를 얻음

+ Recent posts