Basic Math

Hi, I’m doing a very basic math system, but Unity tells me it’s incorrect.

void getRandomMathCalc()
    {
        numOne = Random.Range(0, 10);
        numTwo = Random.Range(0, 10);

        numThree = numOne + numTwo;

        calcText.text = numOne + " + " + numTwo + " = ";
    }

    void checkResult()
    {
        string rText = resultText.text;
        string nText = numThree.ToString();

        Debug.Log(rText);
        Debug.Log(nText);

        if (rText == nText)
        {
            Debug.Log("The answer is correct.");
        }
        else { Debug.Log("The answer is incorrect."); }
    }

Mmmmmm it seems it should work…

Try the inverse. Comvert rText into integrer with Parse() and compare them as a int variable.