I keep getting the error below. What am I doing wrong? MissingComponentException: There is no 'GUIText' attached to th…

Forum Archive I keep getting the error below. What am I doing wrong? MissingComponentException: There is no 'GUIText' attached to th…

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #6029
    Deborah Douglas
    Participant

      I keep getting the error below. What am I doing wrong?

      MissingComponentException: There is no ‘GUIText’ attached to the “ScoreUI” game object, but a script is trying to access it.
      You probably need to add a GUIText to the game object “ScoreUI”. Or your script needs to check if the component is attached before using it.
      GameManager.UpdateScore (Int32 scoreToAdd) (at Assets/MobileSpaceShooter/Scripts/GameManager.cs:155)
      GameManager.Start () (at Assets/MobileSpaceShooter/Scripts/GameManager.cs:78)

      #24802
      Jonathan Gonzalez
      Participant

        Sorry for the late reply, didn’t get this notification. I believe I may have answered this before, but it’s looking for a game object called “ScoreUI” to be assigned to the game manager in the inspector panel.

        In the course I replaced the older GUI Text with the new UI Text elements. I commented out the old variables and just added in new ones with the UI Text type. Ensure the GUI Text variables are all commented out.

      Viewing 2 posts - 1 through 2 (of 2 total)
      • The topic ‘I keep getting the error below. What am I doing wrong? MissingComponentException: There is no 'GUIText' attached to th…’ is closed to new replies.