At this point, I feel like it’s safe to build a UI rather than random buttons on each scene.
For those of you who haven’t been further, Brice explains in the next few videos how to set up a basic control system to control which scenes the player sees when they click various buttons.
I took a bit of initiative and built my own UI that I carried over to each scene. The course has you creating buttons on each scene that do not fit a general UI model. They still allow you to move from one scene to another, but I feel like this would be a great spot to introduce the idea that a UI should flow across a game (if applicable) in the same fashion.
On the bottom of scene Lose and Win, I have a Main Menu and Play Again button. They both look exactly the same and are positioned in the same place.
However, in the Game scene, I have replaced the Play Again button with a Quit button.
These are simple additions you can create by following his instructions on how to create buttons, etc.
I’ve read quite a bit in the last few weeks, and it appears that one of the most troublesome things about making games is the UI. This is a good opportunity to develop an understanding that a simple UI makes the game cleaner and more functional, and adds an expectation the user can rely on. Rather than “oh this is a button” we provide them with two buttons that are always there on most game scenes.
Afterthought: Doing it this way also allows more ease in creation. All you have to do to create your buttons is copy and paste what you have set up in one scene over to the next then modify it slightly. You will have to reattach any scripts or anything like that, but, short of that simple correction, all your highlight effects and click effects and etc will remain.
How did you go about sharing that layout between UI screens?
I just create buttons and link to the LevelManager script. The Start scene is the “Main Menu” button. Play Again changes the scene to the Game scene (starting the round over) and quit pulls the Application.Quit() from the LevelManager script. All I have to do then is copy and paste.
If you build all the scenes to look essentially the same, excluding the Start scene, then you copy and paste to all the rest of the scenes (just as instructed in the video) and change the strings in the buttons around.
The only thing that is different in all 4 of the scenes is the Start scene, which has the Start and Quit buttons as described in the video:
At this point, we have created an expectation for the user. If they want to quit, they go to Main Menu. If they want to Play Again, they click Play Again. I feel like a good UI should set an expectation. I should know, at any moment, that if I do a thing, that thing can lead me to a place. Most UIs, in my experience, are hit escape, click option. This isn’t quite as complex, but it still serves to develop a foundation of UI development, imho.
Hope this explains.
EDIT: I just realized my Game scene doesn’t fit the scheme, but the Quit button there should be replaced with the same Play Again button as in the Win and Lose scenes, giving the user the ability to quit from the Main Menu and restart the game at any given moment while actually playing, rather than having to force a win or lose condition just to restart the round.
Makes sense. You might want to experiment with using prefabs for common configurations of buttons. Then editing the screens might be easier.
Could you elaborate a bit on the prefabs you mention?
I’m well into the Block Breaker section and now I know what you mean by prefabs.
That’s a good idea. I didn’t know I could do this at the time.
Thanks!
1 Like
Awesome. Would love to see what you come up with.
hey guys i was curious if number wizard UI is suposed to come before or after text 101 on udemy as it stands right not it is after so it is section 4 i didnt know if it is a mistake or if it is how you intended it
thank you