- Home /
 
Problem is not reproducible or outdated
Text [BOX]/[GUIText] loads wrong, and no fade text in/out?
I'm having trouble making a Story Text, that the user can read as it fades in and out, as part one fades out it enables part 2, so on. I can make the text appear on the screen with the "GUI.Text" Disables and the script on a blank object turns it on/off.
But it's only 1 line not fading in/out like i need. Part 2 loads up but same issue never fades and after it's deleted it never vanishes.. And /n don't seem to line break the gui.text object.
I could use a little help here, i know you all are busy but im stuck on this, i need it to look half way decent so it don't ruin the atmosphere.
     var TextOne : GameObject;
     var TextTwo : GameObject;
     
     function Start(){
     TextOne.SetActive (true);
     guiText.material.color.a = 0;
     yield WaitForSeconds(0.5);
     FadeIn();
     }
     function FadeIn(){
     while (guiText.material.color.a < 2){
     guiText.material.color.a += 0.1 * Time.deltaTime * 3;
     yield;
     }
     yield WaitForSeconds(0.5);
     FadeOut();
     TextOne.SetActive (false);
     TextTwo.SetActive (true);
     
     }
      
     function FadeOut(){
     while (guiText.material.color.a > 0){
     guiText.material.color.a -= 0.1 * Time.deltaTime * 3;
     yield;
     }
     Destroy (gameObject);
     }
 
               Well i realized i had to place the script on an actual GUI.Text before it would fade lol, but it still work load part 2 text.
Follow this Question
Related Questions
GUIText transition trouble 1 Answer
Scroll intro text 5 Answers
How to make a "Click to Continue" text message? 1 Answer
Gui appear and then fade to black 1 Answer
Font renders incorrectly 1 Answer