Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Unity Cookbook
  • Table Of Contents Toc
  • Feedback & Rating feedback
Unity Cookbook

Unity Cookbook

By : Matt Smith, Shaun Ferns, Sinéad Murphy
4.7 (27)
close
close
Unity Cookbook

Unity Cookbook

4.7 (27)
By: Matt Smith, Shaun Ferns, Sinéad Murphy

Overview of this book

Unleash your game development potential with Unity Cookbook, 5th Edition, designed to equip you with the skills and knowledge needed to excel in Unity game development. With over 160 expertly crafted recipes empowering you to pioneer VR and AR experiences, excel in mobile game development, and become a master of audio techniques. In this latest edition, we've meticulously curated a collection of recipes that reflect the latest advancements in Unity 2023, ensuring you stay at the forefront of game development. You'll discover dedicated recipes for First/Third Person (Core) templates, create engaging mobile games, delve into Virtual and Augmented Reality, and go further with audio by exploring advanced techniques. Additionally, the book has been fully updated to incorporate the new input system and TextMeshPro, essential elements for modern game development. From exploring C# scripting to crafting stylish UIs, creating stunning visual effects, and understanding shader development through Shader Graph, every chapter is designed to take you closer to your goal of becoming a proficient Unity developer. So, whether you're aiming to develop the next hit game, enhance your portfolio, or simply have fun building games, this book will be your trusted companion on your journey to Unity proficiency.
Table of Contents (22 chapters)
close
close
20
Other Books You May Enjoy
21
Index

Technical requirements to get the most out of this book

To complete the recipes in this book, there are some things that you will need.

For all chapters, you will need Unity 2023.1 or later, plus one of the following computer systems:

  • Microsoft Windows 10 (64-bit)/GPU: DX10, DX11, and DX12-capable
  • macOS GPU Metal-capable Intel or AMD
    • Mojave 10.14+ / Intel x64 with SSE2 instruction set support
    • Big Sur 11.0 / Apple Silicon M1 or later
  • Linux Ubuntu 20.04 or Ubuntu 18.04 / Gnome desktop running on X11 / GPU: OpenGL 3.2+ or Vulkan-capable Nvidia or AMD

For each chapter, there is a folder in the book’s GitHub repository that contains the asset files you will need; you can find these at https://github.com/PacktPublishing/Unity-2023-Cookbook-Fifth-Edition.

For recipes in some chapters, additional hardware/software will be helpful:

  • Chapter 4, Playing and Manipulating Sounds

To edit and create audio files yourself, you can download and install the free Audacity application for your computer system (Windows/Mac/Linux). You can find it at https://www.audacityteam.org/download/.

  • Chapter 5, Textures, Materials, and 3D Objects

To work with 3D objects in the Blender editor, you can download it for free at www.blender.org.

  • Chapter 10, Saving and Loading Data
    • Since some of the recipes in this chapter make use of web servers and a database, for those recipes, you will require either the PHP 8 language (which comes with its own web server and SQLite database features) or an AMP package.
    • If you are installing the PHP language, refer to the installation guide and download links:
    • If you do want to install a web server and database server application, a great choice is XAMPP. It is a free, cross-platform collection of everything you need to set up a database and web server on your local computer. The download page also contains FAQs and installation instructions for Windows, Mac, and Linux: https://www.apachefriends.org/download.html.
  • Chapter 15, Particle Systems and Other Visual Effects

If you wish to create your own image files, you will also need an image editor, such as Adobe Photoshop, which can be found at www.adobe.com, or GIMP, which is a free alternative and can be found at www.gimp.org/.

  • Chapter 16, Mobile Games and Apps
    • If developing for Android, you’ll need an Android mobile device.
    • If developing for Apple iOS, you’ll need:
  • Chapter 17, Augmented Reality (AR)

To get the most from this chapter’s recipes, you will need an AR device. For this, you can use a dedicated device such as an AR headset, or you can use smartphone apps to begin experiencing AR.

  • Chapter 18, Virtual Reality (VR)

You will need a device to view VR apps. For this, you can use a dedicated device, such as a VR headset like the Meta Quest 1/2/3, Samsung Gear VR, or Apple Vision Pro. If you wish to use a smartphone for VR projects, there are many low-cost devices to choose from, such as Google Cardboard: https://developers.google.com/cardboard.

Download the example code files

You’ll find the chapter figures, recipe assets, and completed Unity projects for each chapter at https://github.com/PacktPublishing/Unity-2023-Cookbook-Fifth-Edition.

You can either download these files as ZIP archives or use free Git software to download (clone) these files. These GitHub repositories will be updated with any improvements.

We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

Download the color images

We also provide a PDF file that has color images of the screenshots/diagrams used in this book. You can download it here: https://packt.link/gbp/9781805123026.

Conventions used

There are a number of text conventions used throughout this book.

CodeInText: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: “The playerInventoryDisplay variable is a reference to an instance object of the PlayerInventoryDisplay class.”

A block of code is set as follows:

public class PlayerInventoryDisplay : MonoBehaviour {
   public Text starText;
   public void OnChangeStarTotal(int numStars) {
         string starMessage = "total stars = " + numStars;
         starText.text = starMessage;
   }
}

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold, like this:

public class PlayerInventoryDisplay : MonoBehaviour {
   public Text starText;
   public void OnChangeStarTotal(int numStars) {
         string starMessage = "total stars = " + numStars;
         starText.text = starMessage;
   }
}

Bold: Indicates a new term, an important word, or words that you see onscreen. For example, words in menus or dialog boxes appear in the text like this: “In the Inspector panel, set the font of Text-carrying-star to Xolonium-Bold, and set its color to yellow.”

Warnings or important notes appear like this.

Tips and tricks appear like this.

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech

Create a Note

Modal Close icon
You need to login to use this feature.
notes
bookmark search playlist download font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Delete Note

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Edit Note

Modal Close icon
Write a note (max 255 characters)
Cancel
Update Note

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY