Welcome to this course on Unity3D’s new UI Tools introduced in Unity 4.6.
In this course we will create a Simon Says style memory game from scratch primarily using these new UI Tools. You will become familiar with concepts like anchors, rect transforms, canvases and on the way learn some powerful C# scripting techniques like yields and coroutines.
This course is aimed at game developers who have a basic understanding of Unity and C# scripting but who need a bit of practice getting to grips with the new UI features.
Thankyou for your interest in this course, let’s create a game together.
A brief welcome to the course.
An overview of the course content and prerequisites.
A description of the game we are going to create together!
How to go about creating your first button.
A first stab at creating four buttons. Although we won't end up arranging our buttons this way, it is good insight into how the anchors work.
Using layout groups to create a flexible grid of buttons. Perhaps overkill for four buttons but you could definitely use this technique for that inventory screen in your next RPG!
We want a little colour to our buttons. We do this in this video!
More anchor practise, they are important to understand!
We get familiar with the new Text component. It is very nice!
Let's get started on our script, why not start with some variables?
We learn about making our methods public so that we can invoke them from our buttons. We also bind our public variables to our UI.
We get a first stab at our most important method, NextSequence().
Time to test what we have so far, it doesn't do much but we have a solid working foundation.
Well now we start making our buttons light up, always fun!
Is the user pressing the correct buttons in the correct order? We answer that with this bit of code.
Sorry what was that, I can't hear you? Oh you want some sound, well your wish is my command. P.S. bfxr.net is awesome!
Beat your high score. So there!
We should get a little faster, this code will do that.
We start work on our settings panel, a slider for volume? Seems pretty sensible.
We could use another slider for difficulty but where's the fun in that? How about a toggle group?
We start work on some scripting to enable saving/loading settings between game sessions.
We get the volume slider working!
We (I) remember to add the toggle group and get the toggles to work, yay!
We add a script to handle opening and closing the settings panel.
We add the settings button and create animations to open and close the settings panel.
We integrate the difficulty setting into our game.
You have done it! Well done! A complete game! Why not sell it on all the app stores? I don't mind, although if it makes you a millionaire, remember to wave hello from your helicopter...
The complete game is included as a zip file. Simply unzip the file and open the created folder in the latest version of Unity.