Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Hands-On Unity 2022 Game Development
Hands-On Unity 2022 Game Development

Hands-On Unity 2022 Game Development: Learn to use the latest Unity 2022 features to create your first video game in the simplest way possible , Third Edition

Arrow left icon
Profile Icon Nicolas Alejandro Borromeo
Arrow right icon
Can$31.99 Can$45.99
Full star icon Full star icon Full star icon Full star icon Half star icon 4.7 (22 Ratings)
eBook Oct 2022 712 pages 3rd Edition
eBook
Can$31.99 Can$45.99
Paperback
Can$56.99
Subscription
Free Trial
Arrow left icon
Profile Icon Nicolas Alejandro Borromeo
Arrow right icon
Can$31.99 Can$45.99
Full star icon Full star icon Full star icon Full star icon Half star icon 4.7 (22 Ratings)
eBook Oct 2022 712 pages 3rd Edition
eBook
Can$31.99 Can$45.99
Paperback
Can$56.99
Subscription
Free Trial
eBook
Can$31.99 Can$45.99
Paperback
Can$56.99
Subscription
Free Trial

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Hands-On Unity 2022 Game Development

Editing Scenes and Game Objects

In this chapter, we will develop some base knowledge of Unity in order to edit a project, and learn how to use several Unity editor windows to manipulate our first scene and its objects. We will also learn how an object, or GameObject, is created and composed, and how to manage complex scenes with multiple objects using Hierarchies and Prefabs. Finally, we will review how we can properly save all our work to continue working on it later.

Specifically, we will examine the following concepts in this chapter:

  • Manipulating scenes
  • GameObjects and components
  • Object Hierarchies
  • Prefabs
  • Saving scenes and projects

Manipulating scenes

A scene is one of the several types of files (also known as assets) in our project. A “scene” can be used for different things according to the type of project, but the most common use case is to separate your game into whole sections, the most common ones being the following:

  • Main menu
  • Level 1, Level 2, Level 3, etc.
  • Victory screen and lose screen
  • Splash screen and loading screen

In this section, we will cover the following concepts related to scenes:

  • The purpose of a scene
  • The Scene View
  • Adding our first GameObject to the scene
  • Navigating the Scene View
  • Manipulating GameObjects

So, let’s take a look at each of these concepts.

The purpose of a scene

The idea of separating your game into scenes is so that Unity can process and load just the data needed for the scene. Let’s say you are in the main menu; in such a case, you will have only the textures...

GameObjects and components

We talked about our project being composed of assets (the project’s files), and that a scene (which is a specific type of asset) is composed of GameObjects; so, how can we create an object? Through a composition of components.

In this section, we will cover the following concepts related to components:

  • Understanding components
  • Manipulating components

Let’s start by discussing what a component is.

Understanding components

A component is one of several pieces that make up a GameObject; each one is in charge of different features of the object. There are several components that Unity already includes that solve different tasks, such as playing a sound, rendering a mesh, applying physics, and so on; however, even though Unity has a large number of components, we will eventually need to create custom components sooner or later.

In the next image you can see what Unity shows us when we select a GameObject...

Object Hierarchies

Some complex objects may need to be separated into sub-objects, each one with its own components. Those sub-objects need to be somehow attached to the main object and work together to create the necessary object behavior.

In this section, we will cover the following concepts related to objects:

  • Parenting of objects
  • Possible uses

Let’s start by discovering how to create a parent-child relationship between objects.

Parenting of objects

Parenting consists of making an object the child of another, meaning that those objects will be related to each other. One type of relationship that happens is a Transform relationship, meaning that a child object will be affected by the parent’s Transform. In simple terms, the child object will follow the parent, as if it is attached to it. For example, imagine a player with a hat on their head. The hat can be a child of the player’s head, making the hat follow the head while...

Prefabs

In the previous example, we created lots of copies of our enemy around the scene, but in doing so, we have created a new problem. Let’s imagine we need to change our enemy and add a Rigidbody component to it, but because we have several copies of the same object, we need to take them one by one and add the same component to all of them. Maybe later, we will need to change the mass of each enemy, so again, we need to go over each one of the enemies and make the change, and here we can start to see a pattern. One solution could be to select all the enemies using the Ctrl key (Command on a Mac) and modify all of them at once, but that solution won’t be of any use if we have enemy copies in other scenes. So, here is where Prefabs come in.

In this section, we will cover the following concepts related to Prefabs:

  • Creating Prefabs
  • Prefab-instance relationship
  • Prefab variants

Let’s start by discussing how to create and use Prefabs...

Saving scenes and projects

As in any other program, we need to save our progress. The difference here is that we don’t have just one giant file with all the project assets, but several files for each asset.

Let’s start saving our progress by saving the scene, which is pretty straightforward. We can simply go to File | Save or press Ctrl + S (Command + S on a Mac). The first time we save our scene, a window will ask us where we want to save our file, and you can save it wherever you want inside the Assets folder of our project, but never outside that folder; otherwise, Unity will not be capable of finding it as an asset in the project. That will generate a new asset in the project window: a scene file. In the following screenshot you can see how I saved the scene, naming it test, and now it shows up in the Project panel:

Figure 2.37: Scene files

We can create a folder to save our scene in the save dialog, or, if you already saved the scene, you can create...

Summary

In this chapter, we saw a quick introduction to essential Unity concepts. We reviewed the basic Unity windows and how we can use all of them to edit a full scene, from navigating it, then creating premade objects (Prefabs), to manipulating them to create our own types of objects using GameObjects and components. We also discussed how to use the Hierarchy window to parent GameObjects to create complex object Hierarchies, as well as creating Prefabs to reutilize and manipulate large amounts of the same type of objects. Finally, we discussed how we can save our progress.

In the next chapter, we will learn different tools like the Terrain system and ProBuilder to create the first prototype of our game’s level. This prototype will serve as a preview of where our scene will be headed, testing some ideas before going into full production.

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Create the game prototype and learn the fundamentals of Unity editor to build scenes, objects and import objects
  • Add interactivity, win/lose conditions, sound, graphics and artificial intelligence using C# and visual scripting
  • Improve the game graphics, user interface, add visual effects and animations using Animator, Cinemachine, and Timeline

Description

Unity is a cross-platform game engine that provides you with powerful but simple-to-use features to solve the most common problems in Game Development, such as rendering, animation, physics, sound, and effects. You’ll learn to use these features to create simple but complete games (and all the nuances needed to handle Unity). Complete with hands-on tutorials and projects, this book will teach you to use the Unity game engine, create C# and visual scripts, integrate graphics, sound, and animations, and manipulate physics to create interesting mechanics for your game. You’ll then code a simple AI agent to challenge the user and work with profiling tools to ensure code efficiency. Finally, you'll work with Unity's AR tools to create AR experiences for 3D apps and games before publishing them to the world. If you are interested in creating impressive, commercial-quality games that are playable on a variety of platforms, then you’ve come to the right place.

Who is this book for?

Both game and non-game developers who wish to migrate or start building 3D games in Unity will find this book useful. While you'll still able to follow along if you don't have any programming experience, knowing the fundamentals of C# programming will help you get the most out of this book.

What you will learn

  • Build a game prototype that includes gameplay, player and non-player characters, assets, animations, and more
  • Set up and navigate the game engine to dive into the Unity Editor and discover unique and new features released in 2022
  • Learn both C# and Visual Scripting to customize player movements, the user interface, and game physics
  • Apply shaders to improve your game graphics using Shader Graph and Universal Render Pipeline (URP)
  • Create win-lose conditions for the game by using design patterns such as Singleton and Event Listeners
  • Implement Game AI to build a fully functional enemy capable of detecting and attacking the player
  • Debug, test, optimize, and create an executable version of the game to share with your friends

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Oct 31, 2022
Length: 712 pages
Edition : 3rd
Language : English
ISBN-13 : 9781803246666

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Oct 31, 2022
Length: 712 pages
Edition : 3rd
Language : English
ISBN-13 : 9781803246666

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just Can$6 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just Can$6 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total Can$ 160.97
Learning C# by Developing Games with Unity
Can$56.99
Hands-On Unity 2022 Game Development
Can$56.99
Unity 3D Game Development
Can$46.99
Total Can$ 160.97 Stars icon

Table of Contents

22 Chapters
Creating a Unity Project Chevron down icon Chevron up icon
Editing Scenes and Game Objects Chevron down icon Chevron up icon
Grayboxing with Terrain and ProBuilder Chevron down icon Chevron up icon
Importing and Integrating Assets Chevron down icon Chevron up icon
Introduction to C# and Visual Scripting Chevron down icon Chevron up icon
Implementing Movement and Spawning Chevron down icon Chevron up icon
Physics Collisions and Health System Chevron down icon Chevron up icon
Win and Lose Conditions Chevron down icon Chevron up icon
Implementing Game AI for Building Enemies Chevron down icon Chevron up icon
Materials and Effects with URP and Shader Graph Chevron down icon Chevron up icon
Visual Effects with Particle Systems and Visual Effect Graph Chevron down icon Chevron up icon
Lighting Using the Universal Render Pipeline Chevron down icon Chevron up icon
Full-Screen Effects with Post-Processing Chevron down icon Chevron up icon
Sound and Music Integration Chevron down icon Chevron up icon
User Interface Design Chevron down icon Chevron up icon
Creating a UI with the UI Toolkit Chevron down icon Chevron up icon
Creating Animations with Animator, Cinemachine, and Timeline Chevron down icon Chevron up icon
Optimization with Profiler, Frame Debugger, and Memory Profiler Chevron down icon Chevron up icon
Generating and Debugging an Executable Chevron down icon Chevron up icon
Augmented Reality in Unity Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.7
(22 Ratings)
5 star 81.8%
4 star 9.1%
3 star 4.5%
2 star 4.5%
1 star 0%
Filter icon Filter
Top Reviews

Filter reviews by




Jay (Vijayasimha BR) Feb 04, 2023
Full star icon Full star icon Full star icon Full star icon Full star icon 5
(Review copy provided by Publisher)I have myself handled a couple of training batches on Game Development (Unity, Unreal, P5.JS 2D game development). Games are a visual medium, and hence are better learnt visually. However, a handy book reference is always useful when you are learning so many things and want to quickly reference different topics in a book format.That is where, I appreciate what this book does. As it suits a gaming book, the author has provided detailed in-depth images. I would say, almost every page is filled with images, and goes on for explanations for each image.Another thing I appreciate is the explanations for both visual scripting and C# based scripting simultaneously. This is particularly for students who may want to do visual scripting on the first run of learning. Then, on the second run, dig into the more hardcore code-based scripting. That is a good touch. This might appear overkill because, you can get away without any coding at all with modern engines like unreal, but, if you already background in providing, this can save you a lot of time.Lastly, the book starts with beginners and goes on till expert topics. Like, it is a massive book. So, those who want to only learn the basics and start building can stop after the first few chapters, and then, return for more advanced learning on future runs.Seriously, if you are learning game development, you have to do multiple runs. That is the way it is. Anyway, all in all, as a coding tutor, this book is good is what I am trying to say.
Amazon Verified review Amazon
Dan Mar 30, 2023
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I've been working with Unity since 2015, so I can't offer a true beginner's experience. However, I have largely focused on 2D games, and have been using this book as way to dip my toe into 3D and I've not previously used many of the tools that Nicolas outlines here.The book begins with the absolute basics - how to install Unity and set up your game project. From there, you'll walk through some more basics to familiarize you with the 3D Scene Editor. After the first couple of chapters to get you comfortable with Unity and 3D, the rest of the book is focused on building a full project from start to finish. So, while this book could definitely be used as a reference, I think it would most suitably be used to gain the insights from building the project that's outlined.I am not fully through the book, but my personal experience with this book has been positive so far. I skimmed the first chapter, as I was already familiar with installing Unity and creating a Project. The 3D recap was a good refresher/intro to working with 3D in Unity, I felt that it covered enough information without going into so much detail as to get boring. Working through the Project feels informative, and the pacing for each chapter feels just right to me. When it comes to writing code, it will be a mix of Visual Scripting and C#. This has been an interesting learning experience for me as well as I had not used Visual Scripting before, and I feel that it has been a good introduction. As with most Packt books on software development you'll get access to the code and assets for each chapter, so if you get stuck you can always reference that.Overall, this is a great book if you want to level up your Unity 3D skills, or if you are looking to learn Unity development and come out the other end with a finished project.
Amazon Verified review Amazon
Jtown Dec 28, 2023
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Good and fast delivery, book in great condition!
Amazon Verified review Amazon
elian Nov 14, 2022
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Unity 2022 Game Development is worth a look through for anyone who wants to start creating games as a passion or for anyone looking to develop a new skill. Nicolas Alejandro Borromeo does a good job of breaking down all of the sections within the game development life-cycle while teaching the reader how to use Unity to create their rendition of the project. Going over from the simplest concepts of making a Unity project, creating prefabs, and terrain. All the way to height maps, C# scripting, and proper allocation of resources. The chapters are thoroughly filled with information pertaining what part of the game's life cycle the game is at, and the actions that should be taken to continue the development of the game. While also being easy to follow along, you really do not have to have any prior experience with Unity to read through this book and you can still learn something from this book even with prior experience wherever you are on your journey with game development. I would say the only negative is that the chapters are not long enough to fully go into more detail of how to use certain tools and how to use Unity to the fullest potential, but for what the book is trying to do, I would say that this isn't a huge problem. I enjoyed reading and learning more about game design and development with Unity, I hope you guys like it too!
Amazon Verified review Amazon
Maria Dec 23, 2022
Full star icon Full star icon Full star icon Full star icon Full star icon 5
As a Unity Veteran, I can say this book so far has been very informative. I can say this book can be for beginners as well as for advanced developers looking to get into the new Unity topics or get a refresher on the engine’s new topics. I like that the book had the new Unity UI toolkit documentation as well as basic knowledge of shaders. I would recommend anyone looking to learn unity or get updated to obtain this book! - Giovanni Sierra
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.