Quantcast
Channel: Questions in topic: "warnings"
Viewing all articles
Browse latest Browse all 187

Unity 5.5.1 - Weird and conflicting variable never used warning.

$
0
0
I have the following in a script: private Brick brick; void Start() { brick = GameObject.FindObjectOfType(); } This is only a very small portion of the code in this script. I keep getting the warning that the variable "brick" is assigned but never used. If i delete the variable, of course, I get an error that says "the name brick does not exist in the current context. It can't be that I have assigned the variable and simultaneously not assigned it! Anyone know the answer to this? it's a bit annoying. I'm close to finishing up my game and want to clear out all the warning but this one is stubborn.

Viewing all articles
Browse latest Browse all 187

Latest Images

Trending Articles



Latest Images

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