How do you access a variable from another function? It may sound simple (or stupid) but for whatever reason I can’t access it’s value. I have something like this:
void start() {
var variable = 1;
}
void update() {
var var2 = variable;
}
I’m using C# and it’s giving me an error message saying variable doesn’t exist when I’m trying to use it’s value. What syntax should I use so it will know to use variable variable?