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 2022 by Example
  • Table Of Contents Toc
  • Feedback & Rating feedback
Unity 2022 by Example

Unity 2022 by Example

By : Scott H. Cameron
4.9 (8)
close
close
Unity 2022 by Example

Unity 2022 by Example

4.9 (8)
By: Scott H. Cameron

Overview of this book

Unity 2022 by Example is a complete introduction to building games in Unity following a project-based approach. You’ll be introduced to the Unity game engine and the tools available for building and customizing a game exactly the way you want it, while maintaining a good code foundation to build upon. Once you get to grips with the fundamentals of Unity game development, you'll start creating a 2D collection game and an adventure game, followed by a 3D first person shooter game. Next, you’ll explore advanced topics, such as using machine learning to create AI-based enemy behavior, virtual reality for extending the first-person game, and augmented reality for developing a farming simulation game in a real-world setting. The book will help you gain hands-on knowledge of these topics as you build projects using the latest game tool kits. You'll also learn how to commercialize your game by publishing it to a distribution platform and maintain and support it throughout its lifespan. As you progress, you’ll gain real-world knowledge and experience by taking your games from conceptual design to completion. By the end of this Unity book, you’ll have strong foundational knowledge of how to structure a Unity project that is both maintainable and extensible for commercially released games.
Table of Contents (23 chapters)
close
close
1
Part 1: Introduction to Unity
3
Part 2: 2D Game Design
6
Part 3: 2D Game Design Continued
13
Part 4: 3D Game Design
17
Part 5: Enhancing and Finishing Games

What this book covers

Chapter 1, Foundational Knowledge of Unity 2022, provides the introductory steps to learn how to use Unity 2022 to create a game easily! It covers installing Unity Hub and exploring the available templates to kickstart game projects. It also covers how the Package Manager provides additional functionality while keeping project footprints small and avoiding unwanted tooling. This chapter concludes by beginning a new game project, learning about the GameObject, and creating a simple 2D character.

Chapter 2, Creating a 2D Collection Game, provides an in-depth exploration of expanding the scene with additional GameObjects to craft a 2D top-down setting for the start of a collection game. It covers the utilization of Unity’s Tilemap feature for efficient environment creation. This chapter also introduces the fundamental concepts of the C# programming language and will guide you through creating custom scripts to enhance functionality within the game environment. The chapter ends by outlining the integration of player input using Unity’s latest event-based input system.

Chapter 3, Completing the Collection Game, provides an introduction to utilizing Unity’s Cinemachine (CM), a robust camera control system, to follow the player around within the game environment. It will also introduce integrating a user interface (UI) into the game, leveraging Unity’s UI system (uGUI) and custom-coded C# components, including features such as a timer and score tracking.

Chapter 4, Creating a 2D Adventure Game, provides a guide to creating a 2D side-on adventure game using Unity 2D tooling such as Sprite Shape. The chapter covers importing artwork, incorporating dynamic moving platforms, and optimizing game performance. By the end of the chapter, you will have a refined understanding of game design documentation and the ability to design interactive 2D environments, including triggers that provide secondary actions to create more engaging player experiences.

Chapter 5, Continuing the Adventure Game, provides an overview of how to create a rigged and animated 2D player character using the Unity 2D Animation package. The chapter will cover setting up the character avatar using the PSD Importer, implementing an input action map for controlling player movement with a controller script, and animating the character using Mecanim.

Chapter 6, Introduction to Object Pooling in Unity 2022, provides an introduction to object pooling, a crucial optimization pattern used in game development to maintain performance and avoid lags in gameplay. This chapter utilizes this pattern to maintain a performant player shooting mechanic by using Unity’s object pooling API.

Chapter 7, Polishing the Player’s Actions and Enemy Behavior, provides a focus on learning how to improve the visual aesthetics of the player character artwork by introducing Unity’s graph node-based shader authoring tool Shader Graph and the Trail Renderer component. It then presents the creation of diverse non-player character (NPC) enemies using Scriptable Objects (SOs) to configure the different enemy types. The chapter culminates with introducing enemy behavior management through a state pattern.

Chapter 8, Extending the Adventure Game, provides the steps to establish health management and damage infliction mechanisms to equip the player, enemy, and any destructible object with a simple yet effective health system. The chapter also introduces the creation of an enemy wave spawner that enables dynamic spawning.

Chapter 9, Completing the Adventure Game, provides an introduction to creating a global event system that facilitates communication across diverse C# classes and promotes modularity and scalability. Utilizing the newly created event system, the following section covers developing a quest system suitable for any number of custom missions. Additionally, this chapter covers integrating and customizing a puzzle system from the Unity Asset Store to suit a game developer’s specific needs.

Chapter 10, Creating a 3D First Person Shooter (FPS), provides the skills to design and construct a gray-box 3D environment utilizing modular components within the Unity Editor using ProBuilder and Prefabs. It will also cover how to quickly integrate an FPS character controller with the Unity Starter Asset and adapt and optimize existing 2D code for environment interactions into their 3D API methods.

Chapter 11, Continuing the FPS Game, provides instruction on updating and enhancing the previous chapter’s 3D environment by replacing Prefabs and materials, polishing assets, scattering objects using Polybrush, and improving lighting with light baking and light probes. It then introduces the application of wear-and-tear effects to add realism and decorate the environment using decals.

Chapter 12, Enhancing the FPS Game with Audio, provides a focus on improving the player experience by adding audio to a Unity game project. Throughout the chapter, you are provided with the skills and knowledge necessary to create an audio manager and related reusable audio player components to play music, ambient sounds, and sound effects (SFX). The chapter finishes with examples of implementing footstep sounds for the player character and a reverb zone within the game level.

Chapter 13, Implementing AI with Sensors, Behavior Trees, and ML-Agents, provides an introduction to essential artificial intelligence (AI) behavior and NPC navigation using Unity’s AI Navigation package and refactored 2D components from the previous chapters. The chapter also covers enhancing enemy NPC dynamics by introducing sensors and behavior trees. It explores integrating machine learning (ML) tools with Unity ML-Agents to add advanced AI capabilities to games.

Chapter 14, Entering Mixed Reality with the XR Interaction Toolkit, provides the knowledge to develop mixed reality (MR) games and experiences that use a player’s physical space to create immersive and novel gameplay experiences. This chapter uses the Unity XR Interaction Toolkit to make a final boss room encounter in MR. It explores the design process, working with AR Foundation planes, placing interactable objects, and implementing mechanics.

Chapter 15, Finishing Games with Commercial Viability, provides essential knowledge for effective game development project management by exploring Games as a Service (GaaS), Unity DevOps and LiveOps resources, source code management via Unity Version Control, in-game economies, platform distribution, and UGS implementation. It covers managing and securing a project development lifecycle, distributing commercially viable games, and reaching an intended player audience.

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

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