Skip to Main Content
Unity in Action, Second Edition
book

Unity in Action, Second Edition

by Joseph Hocking
April 2018
Intermediate to advanced content levelIntermediate to advanced
400 pages
11h
English
Manning Publications
Content preview from Unity in Action, Second Edition

5 Building a Memory game using Unity’s 2D functionality

This chapter covers

  • Displaying 2D graphics in Unity
  • Making objects clickable
  • Loading new images programmatically
  • Maintaining and displaying state using UI text
  • Loading levels and restarting the game

Up to now, we’ve been working with 3D graphics, but you can also work with 2D graphics in Unity. So in this chapter, you’ll build a 2D game to learn about that. You’re going to develop the classic children’s game Memory: you’ll display a grid of card backs, reveal the card front when it’s clicked, and score matches. These mechanics cover the basics you need to know in order to develop 2D games in Unity.

Although Unity originated as a tool for 3D games, it’s used often for 2D games as well. ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Unity Game Optimization - Third Edition

Unity Game Optimization - Third Edition

Dr. Davide Aversa, Chris Dickinson
Unity Game Development Cookbook

Unity Game Development Cookbook

Paris Buttfield-Addison, Jon Manning, Tim Nugent

Publisher Resources

ISBN: 9781617294969Supplemental ContentPublisher SupportOtherPublisher WebsiteSupplemental ContentErrata PagePurchase Link