- Home /
using tow gutext in the sam scene
Hi , i have tow gutext in the same scene. one is a timer for the game and the other one i need it to use it hen the player is died. i have this code:
int lives =5;
void died()
{
//bring player back to life after died
Instantiate (deth,transform.position,Quaternion.identity);
//putt the player into the original location"start game location"
transform.position = v3;
lives-=1;
}
if (lives == 0)
{
Time.timeScale = 0;
gameObject.guiText.text ="Game Over";
}
the problem is that i cant edit the gutext , i mean this code gameObject.guiText.text ="Game Over";
doesnt work, while the time gutext is work fine .. any ideas ??thanks
Comment
Your answer
Follow this Question
Related Questions
Changing the font size of GUIText (on Unity iPhone)? 1 Answer
GUI Text line break Alt+Enter doesn't work 1 Answer
How do i make a text box appear on screen after a chest has been opened? 3 Answers
How to parent a GUI text to current game object 3 Answers
In game message displayed on GUI - text and texture 1 Answer