Book Image

Hands-On Unity Game Development - Fourth Edition

By : Nicolas Alejandro Borromeo, Juan Gabriel Gomila Salas
Book Image

Hands-On Unity Game Development - Fourth Edition

By: Nicolas Alejandro Borromeo, Juan Gabriel Gomila Salas

Overview of this book

Take your game development skills to the next level. Dive into the world of game creation confidently by elevating your game development skills. This book is your definitive and practical guide to unlocking the full potential of Unity 2023. Every chapter is designed to empower you to customize your own game, not just replicate what's in the book. This new edition includes immersive Augmented Reality (AR) experiences and performance optimization with Data-Oriented Technology Stack (DOTS). From Scene Creation to seamless Assert Integration, dive into C# programming and Visual Scripting with step-by-step guidance for beginners. Implement dynamic gameplay elements, including movement, spawning, physics, and health systems. Delve deeper into the magic of Game AI through sensor-driven decision-making with Finite State Machines (FSMs). Elevate your visuals with materials, shaders, textures, and particle systems. Optimize performance with Profiler insights and debug your game for a polished final product. Whether you're a beginner or a seasoned pro, this book will equip you with the skills needed to bring your game ideas to life.
Table of Contents (28 chapters)
Free Chapter
1
Section 1: Getting Started with Unity
6
Section 2: Mastering Programming and Gameplay Mechanics
10
Victory or Defeat: Win and Lose Conditions
12
Section 3: Elevating Visuals, Effects, and Audio
18
Section 4: Designing User Interfaces, Animations and Advanced Concepts
23
From Prototype to Executable: Generating and Debugging Your Game
26
Other Books You May Enjoy
27
Index

Manipulating scenes

A scene is one of the several types of files (also known as assets) in our project. Other types of files include scripts for code, audio files, 3D models, and textures, among others. 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:

  • The main menu
  • Level 1, Level 2, Level 3, etc.
  • A victory screen and a lose screen
  • A splash screen and a 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 a 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...