Search Unity

"the type or namespace name "TeaxtMeshProGUI" could not be found

Discussion in 'Getting Started' started by unity_917561D70A37CE5CB709, Oct 25, 2022.

  1. unity_917561D70A37CE5CB709

    unity_917561D70A37CE5CB709

    Joined:
    Oct 25, 2022
    Posts:
    1
    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    using TMPro;

    public class NewBehaviourScript : MonoBehaviour
    {

    public TextMeshProGUI btnStart;

    void OnMouse(){
    Invoke("startGame",0);
    }

    void startgame(){
    btnStart.MeshRenderer = false;

    }

    }

    error
    "the type or namespace name "TeaxtMeshProGUI" could not be found


    I thought all you needed was using TMPro; what am I missing?
     
  2. Schneider21

    Schneider21

    Joined:
    Feb 6, 2014
    Posts:
    3,512
    Welcome! You've simply entered the wrong text for the type. It's not "TextMeshProGUI". It's "TextMeshProUGUI".

    Also, for future reference you'll want to make sure you use code tags for sharing code, as it'll format the text and make it easier for the rest of us to read, which will make it easier for people to assist you. Also make sure you copy the exact and full error message from the console, as it points to directly where the issue is (saving us AND YOU from having to hunt it down). I can tell you didn't copy it because your error message has typos in it.

    Back to work!