回答編集履歴

1

string\.Formatの代わりにDebug\.LogFormatを使うよう変更

2017/07/27 11:18

投稿

Bongo
Bongo

スコア10807

test CHANGED
@@ -98,7 +98,7 @@
98
98
 
99
99
  timeLeft = MouseStillDownDuration; // 残り待機時間を初期値に設定する
100
100
 
101
- Debug.Log(string.Format("Deleting {0}...", blockColliderToDelete.gameObject.name));
101
+ Debug.LogFormat("Deleting {0}...", blockColliderToDelete.gameObject.name);
102
102
 
103
103
  }
104
104
 
@@ -112,7 +112,7 @@
112
112
 
113
113
  var newBlock = Instantiate(Prefab, Camera.main.ScreenToWorldPoint(clickPosition), Prefab.transform.rotation);
114
114
 
115
- Debug.Log(string.Format("{0} is instantiated.", newBlock.name));
115
+ Debug.LogFormat("{0} is instantiated.", newBlock.name);
116
116
 
117
117
  }
118
118
 
@@ -144,7 +144,7 @@
144
144
 
145
145
  {
146
146
 
147
- Debug.Log(string.Format("Time left: {0:F4}", timeLeft)); // 分かりやすくするためtimeLeft > 0.0fの時は残り時間を表示していますが、実際はtimeLeft <= 0.0fで判定してしまえばいいかと思います
147
+ Debug.LogFormat("Time left: {0:F4}", timeLeft); // 分かりやすくするためtimeLeft > 0.0fの時は残り時間を表示していますが、実際はtimeLeft <= 0.0fで判定してしまえばいいかと思います
148
148
 
149
149
  }
150
150
 
@@ -156,7 +156,7 @@
156
156
 
157
157
  var blockToDelete = blockColliderToDelete.gameObject;
158
158
 
159
- Debug.Log(string.Format("{0} is deleted.", blockToDelete.name));
159
+ Debug.LogFormat("{0} is deleted.", blockToDelete.name);
160
160
 
161
161
  Destroy(blockToDelete);
162
162