hi i need to get int value from my script Score.cs to Planemovement.cs.
in score.cs its called static int score and it equals to 0 at beginning but raises during the game.
if the number is >= 10 it will show an ad when the character dies and the game restarts.
i have everything else set up, i just need to know how the Planemovement script can acces that int.

Static members are accessible at the Class level, so :

Score.score

will be available from anywhere.

@jikkou
‘Score.score’ is inaccessible due to its protection level

edit: Thank @jikkou , all i had to do is make the static int public and it worked :slight_smile: