In this video, Jesse Freeman teaches you how to add a simple lightning effect to the game. While Unity does support real time lighting it also helps know tricks to create more optimized ways to add lighting to your scene such as using a transparent to black gradient as a UI Image overlay. Learning how to polish a Unity 5 game is an import skills for building a 2D game.
- [Voiceover] At this point, we're now ready to keep track…of the high score.…Let's go back into our game manager and open up…the game script.…When the player dies, we're gonna wanna test that the time…elapsed is better than the best time we already have.…At the very end of on player killed, let's add…the following condition.…If time elapsed is greater than best time, we're gonna wanna…save this value out.…First, we're gonna set best time to equal…the current time elapsed.…
Then we're gonna take advantage of something called…the player class.…This class allows us to save values into Unity…similar to how cookies work in a web browser.…Here, we're gonna save a float value, we're gonna give…it an ID of best time and we're gonna pass it in…the value of best time.…Now also, we're gonna wanna actually get a reference…to best time when we start the game.…This way when the first game is over, we already have…the value of best time.…
In this case, let's go all the way up to the start method…and at the end, let's set the best time to equal player…
Start watching to learn how to convert artwork into sprites, create repeating background textures with Unity's TexturePacker, and build reusable game objects such as players, obstacles, and enemies. Jesse also covers the basics of object pooling, working with custom UI components, and multiplatform publishing.
- Importing artwork
- Editing sprites
- Creating repeating background textures
- Building reusable obstacles
- Recycling game objects
- Building an object pool
- Creating the player
- Starting and ending the game
- Displaying and saving the score
- Adding menus and text
- Publishing a Unity game in different formats
Skill Level Beginner
Unity 5: 2D Optimizing Graphicswith Jesse Freeman28m 2s Intermediate
1. Working with Sprites
2. Creating Repeating Textures
3. Creating Obstacles
4. Object Pooling
5. Creating the Player
6. Setting Up the Game
7. Polishing the Game
8. Creating More Obstacles
Publish to different formats5m 42s
- 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.