Non Monobehaviour GameManager?


most time I use Monobehaviour scripts, but now I want to create a GameManager which contains a lot of variables.
I don’t want to attach it to a GameObject, that means I can’t use monobehaviour.
The variables have to be accessed from every script in my project and the variables are changed at runtime, so I can’t use
GameManager g = new GameManager();

How can I create and get one instance of a non-monobehaviour script?

Thanks for your help!

You can try something like that:

// A static class can't me instantiated;
public static class GameManager
    // Variables that can be acessed by GameManager.myVarName;
    public static int myInt;
    public static Vector2 myVector2;
    // Methods that can be acessed by GameManager.myMethodName;
    public static void MyMethod()
        // do stuff;