Unity How to access variables from another script

Create a public variable in a script.

GameManager.cs
public static int MY_VAR = 10;

You can access this from another script like this:

Other.cs
int newVar = GameManager.MY_VAR;
Navigation
Print/export
Toolbox