FindObjectOfType return null ?

Hello

I’m creating two Buttons on my Menu, this button set language to English or Brazilian. I have an Class that receive language selected of button. When I use FindObjectOfType to instantiate this Class does return Null and I don’t know why.

I’m trying this.

Menu

public class Menu : MonoBehaviour {

    public GUISkin skinMenu;
    
    public Texture2D english, brazilian;

    //language version
    private DefineLanguage language;

    // Use this for initialization
    void Start(){        
        language = FindObjectOfType(typeof(DefineLanguage)) as DefineLanguage;
        
    }

    // Update is called once per frame
    void Update()
    {

    }

    void OnGUI(){
        GUI.skin = skinMenu;
        
        bool englishVersion = GUI.Button(new Rect(Screen.width / 2 - 800, Screen.height / 2 - 350, 400, 400), english);
        bool brazilianVersion = GUI.Button(new Rect(Screen.width / 2 - 800, Screen.height / 2 - 300, 400, 400), brazilian);

       
       if(englishVersion){
            language.setVersion("English");
            
       }else if(brazilianVersion){
            language.setVersion("Brazilian");
       }
    }       
}

Class - DefineLanguage

public class DefineLanguage : MonoBehaviour {

    private string language;	

    public void setLanguage(string lang){
        this.language = lang;        
    }

    public bool isEnglishLanguage(){
        if(language.Equals("English")){
            return true;
        }else{
            return false;
        }
    }
}

This only returns a DefineLanguage if you have an active objectg on the scene that contains a DefineLanguage component. if you would like to instantiate it add this component to any gameobject. Even to an empty one.

    void Start(){  
        GameObject languageObject = new GameObject("LanguageObject");
        language = languageObject.AddComponent<DefineLanguage>();
 
    }