If I have a temp game object or list or anything in a function would it be best practice to call it each time I call the function or should I just have a temp global variable that assigns a new value?
private int bar = 0;
private void Foo(int value)
{
bar = value;
}
Or
private void Foo(int value)
{
int bar = value;
}