質問編集履歴

1

エラーメッセージの追加

2018/11/27 15:17

投稿

kotakot
kotakot

スコア36

test CHANGED
File without changes
test CHANGED
@@ -1,5 +1,11 @@
1
1
  unityでレベルが上がると色が変わるというものをプログラムしたいのですがネットをみてその通りにしても、色が変わらないうえに、**エラーメッセージすら出ません**。
2
2
 
3
+
4
+
5
+ 訂正
6
+
7
+ LEVEL1の時はエラーメッセージは出ませんが、LEVEL2の時は下のようなエラーメッセージがでます。
8
+
3
9
  ### shaderのスクリプト
4
10
 
5
11
  ```C#
@@ -261,3 +267,21 @@
261
267
  }
262
268
 
263
269
  ```
270
+
271
+ ###エラーメッセージ
272
+
273
+ ```
274
+
275
+ You probably need to add a Renderer to the game object "GameObject". Or your script needs to check if the component is attached before using it.
276
+
277
+ UnityEngine.Renderer.get_material () (at C:/buildslave/unity/build/Runtime/Export/GraphicsRenderers.bindings.cs:129)
278
+
279
+ shiny.LEVEL2 () (at Assets/script/shiny.cs:69)
280
+
281
+ shiny+<FuncCoroutine>d__10.MoveNext () (at Assets/script/shiny.cs:39)
282
+
283
+ UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at C:/buildslave/unity/build/Runtime/Export/Coroutines.cs:17)
284
+
285
+
286
+
287
+ ```