If a script class is derived from Monobehavior, it must be attached to a game object in the editor and become a component.
Imagine a game object called GameManager with a script attached called GameData. This is how we get the GameData component:
private GameData gameData;void Start () { gameData = GameObject.FindWithTag ("GameManager").GetComponent<GameData> ();}Calling GameObject.FindWithTag is more efficient than calling GameObject.Find