- Home /
Game simple intro/ending
Hi all,
I was wondering if someone could give me a hand. I'm not exaclty an experienced programmer, but I would like to add a simple text intro to my game.
Long version:
Right now, I have MyGUI set up (I would like to use it to display the text), and the rest of the screen would be just black.
I thought maybe the best way to accomplish this, would be adding a second camera, a black plane for background and the text would show up as soon as the game start. Once the text is over (a few lines, clicking to pass to the next one), then the player clicks to go to the main camera and play the game.
Is this the best way to do it? And how do I code this?
In my mind it is simple, but I can't seem to be able to do code it by myself (been at it for hours).
Short version: - Need to start the game in camera 1 - Show the text using myGUI (already coded); - Click advances - Last click changes to camera 2 and the game begins.
Thanks in advance for any help provided!
You don´t need two cameras for that. Ins$$anonymous$$d, just have a game state variable so that you know what to do with OnGUI() and Update() for each individual game state you have. Clicking that "advance" button you mentioned just trigger the game state corresponding to "game is running".
I see, so I create a variable that will control when it's "intro time" and "game time".
But how do I set up the black screen, so the game wouldn't be running in the background while the intro text is running?
And, do I need to set up two scenes for this?
Answer by Rafa · Jan 26, 2012 at 03:43 PM
I see, so I would just use a variable to control the game state to "intro" and "game", right?
But how could I set the screen black, depending on the variable?
Your answer
![](https://koobas.hobune.stream/wayback/20220613063403im_/https://answers.unity.com/themes/thub/images/avi.jpg)