How to access the script attached to a gameobject without specifying the script name c#

I’ve got a game object which needs to talk to a script attached to another gameobject “SceneManager” (which is always tagged “GameController” in each scene).
The name of the script attached to the SceneManager will change in different scenes but i want to write a script for the other game object which will retrieve variables from the script attached to the SceneManager regardless of how the name of the script changes. There is only one script attached to the game object SceneManager and only one SceneManager per scene loaded.

This is how far i’ve currently gotten with my code. I can save the name of the script (“GameControllerScriptName”) but i can’t just do SceneManager.GetComponent<GameControllerScriptName>() to get the script.

Obviously if the name of the script was constant what does work is:

SceneManager.GetComponent<ActualScriptName>()

But the actual script name changes across scenes. This is my current Code:

    public GameObject SceneManager; //This object has the script attached which we want to retrieve.

    public MonoBehaviour GameControllerScriptB; //I've tried to get the script using the variables below
    public Component GameControllerScript; //
    public string GameControllerScriptName;

    void Awake () {
        SceneManager = GameObject.FindWithTag("GameController");
        GameControllerScriptB = SceneManager.GetComponent<MonoBehaviour>() as MonoBehaviour;
        GameControllerScriptName = GameControllerScriptB.GetType().ToString();
        GameControllerScript = SceneManager.GetComponent(GameControllerScriptName);
}

I’m using Unity 2017.2.0f3 and c#.

Probably the best way to do this is to create a base class that inherits MonoBehavior, then to have all your different SceneManager scripts inherit that class instead of MonoBehavior, then call GetComponent with your base class as the type which will retrieve any component on the object that inherits that class. The base class can expose the common functionality that all other scripts will implement, providing a consistent interface for the other objects in the scene to read the data from.