Quantcast
Channel: Questions in topic: "error"
Viewing all articles
Browse latest Browse all 7934

Expression denotes a `type', where a `variable', `value' or `method group' was expected

$
0
0
This code should take the colors from the array and put them randomly on he cube GameObject; but i get that error. (C#) public GameObject cube; public Color[] cubeColor; void Update () { if (Input.GetKeyDown (KeyCode.Space)) { cube.GetComponent ().material.color = ChangeColor(cubeColor [Random (0, cubeColor.Length)]); } } Color ChangeColor(Color newColor) { return newColor; }

Viewing all articles
Browse latest Browse all 7934

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>