- Home /
Using Static Value?
Hello. I know this is a simple concept, but I have looked in the manuel/reference and i just cannot seem to understand this, how does unity use numbers (static variables?)? I want to make a score for the game, how do I reference the "Score" value through another function? How do I activate a function when the score value equals a certain amount? Thank you.
static var Score = 5; print(Score); Score = 1;
Comment
Answer by Proclyon · Nov 18, 2010 at 08:35 AM
Unity doesn't do anything magical with static compared to other users. All you need to know is what static is really. Just remember that static means something has no object reference.
You can check
Your answer
![](https://koobas.hobune.stream/wayback/20220613083522im_/https://answers.unity.com/themes/thub/images/avi.jpg)