So I’m creating a game for a final project in my program, we’re nearing the end and we just realized we are going to need a tutorial to explain to players how to play the game. Our game is played entirely through the UI, and initially we were going to create a video, edit and use that as the tutorial in the game or take a more interactive route. Due to time constraints we’re thinking our best bet is going to be a still image of our UI elements, with textboxes (Just text inside an empty game object with a background) that appear, wait about 8 seconds and then disappear and the next one appears.
We’re having a difficult time conceptualizing how to accomplish this, I believe our best bet with this is going to be to have an array of game objects that we iterate through, showing the first then after 8 seconds, destroy it and reveal the next for 8 seconds and then destroy and so on. Just looking for some insight on how we might be able to do this with a script. I feel like this is super easy and staring me in the face but I’m just having a difficult time conceptualizing it.
Low tech way: coroutines
High tech way: Timeline: About Timeline | Timeline | 1.2.18
You could also consider letting the user advance on their own with a next button. Then it doesn’t matter how long it takes them, they can read through at their own pace.
Ahh yes, I think I’ll be using a coroutine, it’s an area I’m familiar with so this should be simple enough to do! Thanks again for the help! (Also thank you for bringing my attention to Timelines, I’ll have to explore this feature!)
Yeah, I think what I’m going to do is use a button on each game object and using a coroutine remove them as the button is clicked!
About removing objects, you should use SetActive, and not Destroy. Set Active leaves the object in the scene, but it is paused completely, and Destroy removes it from the scene, setting any script refers to that object blank.
You wouldn’t need a coroutine. Buttons have an onClick event that you just tie things to. So when the button is clicked, you just have it run some code.