Reader small image

You're reading from  Unity Certified Programmer Exam Guide - Second Edition

Product typeBook
Published inMay 2022
Reading LevelIntermediate
PublisherPackt
ISBN-139781803246215
Edition2nd Edition
Languages
Right arrow
Author (1)
Philip Walker
Philip Walker
author image
Philip Walker

Philip Walker originally started as a 3D game artist, but then decided he wanted to combine his current skills with coding so that he could see through the majority of his games' and apps' development himself. Philip has worked in various different industries as an artist and as a Unity developer using various types of technology and techniques.
Read more about Philip Walker

Right arrow

Preface

Unity Certified Programmer: Exam Guide – Second Edition will take a basic object-oriented programmer and introduce them to Unity through a creative project that stretches across the entire book, achieving essential exam core objectives that can be put toward Unity's own Official Programmer Exam.

This book will take you (the programmer) through a discussion of the exam itself, breaking down each of its objectives, and what is expected of you to achieve a pass. From there, everything we'll discuss relates to supporting you with potential questions from the exam. So, we'll start straight away and refer to an overview of common design patterns and even more common SOLID principles that all programmers need to know. We will go through our game design brief and custom-built framework before we even touch Unity.

After installing Unity, you will begin to take your first steps in building a side-scrolling shooter game, and at the beginning of every chapter, it will be brought to your attention which core objectives we will be covering to support you. After some chapters, you will also be tested with a mini mock exam to see how you are getting on.

By the end of the book, you will have created a game that can be played on a standalone PC and/or Android device supporting a keyboard and touch screen controls, where you will fly a spaceship to fight off oncoming enemies.

As early as Chapter 2, Adding and Manipulating Objects, you will have coded the majority of the game, and the following chapters that we'll progress through will introduce you to Unity's tools and components, such as the Timeline, which is specifically built for the TV/film industry and cutscenes in games. You will cover particle effects, different materials to apply to your game objects to make them react to light, fading the sound in and out by manipulating an audio mixer with your scripting, pausing the game, storing values in your own scriptable objects, and much, much more.

Even if you aren't taking the Unity Certified Programmer Exam, you will make a game that you can continue to develop, play, and learn from.

Who this book is for

This Unity engine book is for game developers, software developers, mobile app developers, and Unity developers who want to advance in their careers and gain gaming industry certification. The book assumes basic knowledge of C# programming and the Unity engine.

What this book covers

Chapter 1, Setting Up and Structuring Our Project, introduces what is expected of you in the exam, discusses SOLID principles, and gives an overview of design patterns. You will also see how we are going to create our game by looking at its framework and version control.

Chapter 2, Adding and Manipulating Objects, gets you started with coding and importing 3D assets to get the basics of the game functioning.

Chapter 3, Managing Scripts and Taking a Mock Test, extends the game out into menu screens, adding sound, adding a scoring system, and ending with the first mock exam.

Chapter 4, Applying Art, Animation, and Particles, focuses on understanding materials, animating textures, and creating particle systems.

Chapter 5, Creating a Shop Scene for Our Game, introduces the shop scene and how to make use of Unity's raycast system, which shoots invisible rays to help identify game objects, and looks at various uses of scriptable objects for filling out content.

Chapter 6, Purchasing In-Game Items and Advertisements, covers making the shop scene have a working in-game balance to buy upgrades and introduce users to watch adverts to gain extra in-game credits. By the end of the chapter, the player will be able to make use of firing a new weapon and taking extra hits from enemies with their bought shield.

Chapter 7, Creating a Game Loop and Mock Test, covers moving through each screen until the game loops back to the beginning to create a game loop, finishing off with a mock test that has questions on the material learned so far.

Chapter 8, Adding Custom Fonts and UI, gets you more familiar with Unity's 2D Canvas, adding polish to each screen by applying image components and custom fonts and animating each level's title.

Chapter 9, Creating a 2D Shop Interface and In-Game HUD, takes the shop scene from looking less like a prototype to more polished and functioning to support various screen aspect ratios. This chapter also introduces an in-game life, map, and score system.

Chapter 10, Pausing the Game, Altering Sound, and a Mock Test, covers the creation of a pause screen for each level of the game, which will give options to alter the game's volume controls, as well as quitting and resuming the game, followed by a mock test to check your knowledge of the chapter.

Chapter 11, Storing Data and Audio Mixer, makes use of Unity's own PlayerPrefs, and compares it with JSON and storing data in the cloud with remote settings.

Chapter 12, NavMesh, Timeline, and a Mock Test, introduces a new enemy that attempts to escape the player with the use of AI and looks at animating a boss into the scene with the use of Unity's animation tool, Timeline, and extending its functionality to animate flashing lights. There's another mock test at the end of the chapter to see how well things are going.

Chapter 13, Effects, Testing, Performance, and Alt Controls, discusses making use of colliders, rigidbody properties, visual effect post-processing, global lighting, and reflection probes. This chapter also looks at further gameplay functionality to support mobile controls, as well as building and testing the game on PC and mobile.

Chapter 14, Full Unity Programmer Mock Exam, includes over 90 questions to answer and to test you on what you've learned from all 13 chapters. The answers can be found in the appendix.

To get the most out of this book

Some familiarity with Unity would be helpful but is not essential. A basic understanding of C# or any other object-oriented programming knowledge is required. At the time of writing this book, the Unity exam is based on Unity version 2020 LTS. We'll go through the procedure of downloading and installing the software in Chapter 1, Setting Up and Structuring Our Project. If, for any reason, you are using a later version of Unity, that shouldn't matter unless the book mentions where things may differ between versions.

System requirements

The following table is a list of requirements for Unity to run on your system. For any further information about system requirements, check the following link: https://docs.unity3d.com/Manual/system-requirements.html.

Download the example code files

You can download the example code files for this book from GitHub at https://github.com/PacktPublishing/Unity-Certified-Programmer-Exam-Guide-Second-Edition. If there's an update to the code, it will be updated in the GitHub repository.

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

Code in Action

The Code in Action videos for this book can be viewed at https://bit.ly/3LslyB0.

Download the color images

We also provide a PDF file that has color images of the screenshots and diagrams used in this book. You can download it here: https://static.packt-cdn.com/downloads/9781803246215_ColorImages.pdf.

Conventions used

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

CodeInText: Indicates code words in the text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "A Unity package is a single file that contains various assets that can be used in Unity in a similar manner to a .zip file."

A block of code is set as follows:

void Start()
{
       this.transform.localPosition = Vector3.zero; startPos   = transform.position;
       Distance();
}

Bold: Indicates a new term, an important word, or words that you see on screen. For instance, words in menus or dialog boxes appear in bold. Here is an example: "With our GameManager game object selected from the Hierarchy window, go to the Inspector window."

Tips or Important Notes

Appear like this.

Get in touch

Feedback from our readers is always welcome.

General feedback: If you have questions about any aspect of this book, email us at customercare@packtpub.com and mention the book title in the subject of your message.

Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you have found a mistake in this book, we would be grateful if you would report this to us. Please visit www.packtpub.com/support/errata and fill in the form.

Piracy: If you come across any illegal copies of our works in any form on the internet, we would be grateful if you would provide us with the location address or website name. Please contact us at copyright@packt.com with a link to the material.

If you are interested in becoming an author: If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, please visit authors.packtpub.com.

Share Your Thoughts

Once you've read Unity Certified Programmer Exam Guide Second Edition, we'd love to hear your thoughts! Please click here to go straight to the Amazon review page for this book and share your feedback.

Your review is important to us and the tech community and will help us make sure we're delivering excellent quality content.

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Unity Certified Programmer Exam Guide - Second Edition
Published in: May 2022Publisher: PacktISBN-13: 9781803246215
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.
undefined
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 $15.99/month. Cancel anytime

Author (1)

author image
Philip Walker

Philip Walker originally started as a 3D game artist, but then decided he wanted to combine his current skills with coding so that he could see through the majority of his games' and apps' development himself. Philip has worked in various different industries as an artist and as a Unity developer using various types of technology and techniques.
Read more about Philip Walker