Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Unity 2022 by Example

You're reading from   Unity 2022 by Example A project-based guide to building 2D and 3D games, enhanced for AR, VR, and MR experiences

Arrow left icon
Product type Paperback
Published in Jun 2024
Publisher Packt
ISBN-13 9781803234595
Length 596 pages
Edition 1st Edition
Tools
Arrow right icon
Author (1):
Arrow left icon
Scott H. Cameron Scott H. Cameron
Author Profile Icon Scott H. Cameron
Scott H. Cameron
Arrow right icon
View More author details
Toc

Table of Contents (23) Chapters Close

Preface 1. Part 1: Introduction to Unity
2. Chapter 1: Foundational Knowledge of Unity 2022 FREE CHAPTER 3. Part 2: 2D Game Design
4. Chapter 2: Creating a 2D Collection Game 5. Chapter 3: Completing the Collection Game 6. Part 3: 2D Game Design Continued
7. Chapter 4: Creating a 2D Adventure Game 8. Chapter 5: Continuing the Adventure Game 9. Chapter 6: Introduction to Object Pooling in Unity 2022 10. Chapter 7: Polishing the Player’s Actions and Enemy Behavior 11. Chapter 8: Extending the Adventure Game 12. Chapter 9: Completing the Adventure Game 13. Part 4: 3D Game Design
14. Chapter 10: Creating a 3D First Person Shooter (FPS) 15. Chapter 11: Continuing the FPS Game 16. Chapter 12: Enhancing the FPS Game with Audio 17. Part 5: Enhancing and Finishing Games
18. Chapter 13: Implementing AI with Sensors, Behavior Trees, and ML-Agents 19. Chapter 14: Entering Mixed Reality with the XR Interaction Toolkit 20. Chapter 15: Finishing Games with Commercial Viability 21. Index 22. Other Books You May Enjoy

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.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at £16.99/month. Cancel anytime