Quantcast
Channel: Answers by "Graham-Dunnett"
Viewing all articles
Browse latest Browse all 959

Answer by Graham Dunnett

$
0
0
`MissingComponentException:` This means that your game object needs an additional component. `There is no 'GUIText' attached to the "Main Camera" game object, but a script is trying to access it.` Now we know that the component that Unity can't find is a `GUIText`, and it's the `Main Camera` game object with the problem. `You probably need to add a GUIText to the game object "Main Camera".` Unity has provide you some excellent advice. `Or your script needs to check if the component is attached before using it. PauseMenu.Update () (at Assets/_Scripts/PauseMenu.js:14)` Now we're told that it's line 14 of your `PauseMenu.js` script that caused the problem. You seem to have gained one extra line when you dumped your script onto Answers. Line 14 on Answers shows you using `guiText`. Your camera is missing the `GUI Text`component. Select the Main Camera in the hierarchy window, then use the `Component->Rendering->GUI Text` menu to add the missing component.

Viewing all articles
Browse latest Browse all 959

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>