static void DrawGrid(VoxelBuilder target) { var X = target.GetX(); var Y = target.GetY(); var nowHeight = target.GetNowFlowerHeight(); var original = target.transform.position + nowHeight; //畫直線 var yLine = Y * VoxelBuilder.yUnit * Vector3.forward; var offset = VoxelBuilder.xUnit * Vector3.right; var from = original; for (var x = 1; x <= X + 1; ++x) { Gizmos.DrawLine(from, from + yLine); from = from + offset; } //畫橫線 offset = VoxelBuilder.yUnit * Vector3.forward; var xLine = X * VoxelBuilder.xUnit * Vector3.right;; from = original; for (var y = 1; y <= Y + 1; ++y) { Gizmos.DrawLine(from, from + xLine); from = from + offset; } }