Join Jesse Freeman for an in-depth discussion in this video Add keyboard window buttons, part of Unity 5: 2D Advanced UI.
- [Voiceover] So now we're ready to finish off…our keyboard window.…We'll need to add some buttons to allow us…to delete text, to go back to the previous screen,…and also to go forward to the next screen.…To get started let's open the keyboard window class.…and add a few new methods.…Right below the OnKeyPress method,…let's start with our delete method.…We'll make this public, we'll set it to void…since it won't return anything.…And call it OnDelete.…When we call OnDelete we're going to test…that the text references length is greater than zero.…
This way we don't try…to delete characters that don't exist.…If we see that there's something to delete…we'll simply reset the text to equal the value…of the text minus the last character.…And that takes care of our delete method.…The next method we'll want to add…is an OnAccept.…We'll call this after you're done editing the input.…Let's set this to open up the start screen by telling…the manager to open window ID zero.…And finally let's add an OnCancel button…in case we don't want to add a name…
Unity expert Jesse Freeman helps you design your UI using custom prefabs (reusable UI elements), UI components such as windows and buttons, simple buildup animations, and transitions. He also helps you create a window manager to guide changes and relationships between windows, and extend the window system with a custom Unity editor that lets you standardize window display and navigation throughout your game.
- Creating Unity prefabs: fonts, colors, buttons, and labels
- Adding a title, credits, and buttons to the start screen
- Adding a game over screen
- Creating animated stats for the game over screen
- Transitioning between windows
- Building a keyboard window
- Mouse, keyboard, and controller navigation
- Building a custom Unity editor for managing in-game windows
- Adding a window to select difficulty level
Skill Level Intermediate
Unity 5: 2D Generate Procedural Terrainwith Dan Violet Sagmiller4h 4m Intermediate
Unity 5: 2D Essential Training (2015)with Jesse Freeman3h 22m Intermediate
Unity 5: 2D Building a Tile Map Editorwith Jesse Freeman1h 38m Intermediate
1. Create UI Prefabs in Unity
2. Create a Start Screen in Unity
3. Create a Game Over Screen in Unity
4. Create a Window Manager
The window manager3m 45s
5. Create a Virtual Keyboard Window
6. Extend the Window System
7. Add a Difficulty Window in Unity
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.