Question by
AmirGlickVRandMore · Jun 26, 2018 at 07:45 PM ·
staticstatic variable
a static variable resets whenever i enter again the update method
static int num;
void Update()
}
print(num);
num++;
print(num)
}
it always gives me in the result: 0 1
Comment
why you have it static? I'm not sure all that a static variable means, but as far as i know, is usefull when you make it public.