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.
↧