Unity Certified Programmer Exam Guide - Second Edition

Book description

A practical guide to Unity game scripting using C#, along with practice tests, exam tips, and easy-to-follow examples to help you pass the exam and become a professional Unity programmer

Key Features

  • Learn essentials of game scripting with Unity and C# to customize aspects of your game
  • Tackle challenges in Unity game development and the certification exam using effective techniques and solutions
  • Prepare for the latest Unity certification exam using mock tests, exam tips, and self-assessment questions

Book Description

Unity Certified Programmer is a global certification program by Unity for anyone looking to become a professional Unity developer. The official Unity programmer exam will not only validate your Unity knowledge and skills, but will also enable you to be a part of the Unity community.

This study guide will start by building on your understanding of C# programming and taking you through the process of downloading and installing Unity. You’ll understand how Unity works and get to grips with the Unity exam’s core objectives. As you advance, you’ll enhance your skills by creating an enjoyable side-scrolling shooter game that can be played within the Unity Editor or any modern Android mobile device. This Unity book will test your knowledge with self-assessment questions and help you take your skills to an advanced level by working with Unity tools such as the animator, particle effects, lighting, UI/UX, scriptable objects, and debugging.

By the end of this book, you’ll have developed a solid understanding of the different tools in Unity and be able to create impressive Unity applications by making the most of its toolset.

What you will learn

  • Discover techniques for writing modular, readable, and reusable scripts in Unity
  • Implement and configure objects, physics, controls, and movements for your game projects
  • Understand 2D and 3D animation and write scripts to interact and use Unity's rendering API
  • Explore Unity APIs for adding lighting, materials, and textures to your apps
  • Write Unity scripts for building interfaces for menu systems, UI navigation, application settings, and much more
  • Focus on SOLID principles for writing clean and maintainable Unity applications

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 career and gain gaming industry certification. The book assumes basic knowledge of C# programming and the Unity engine.

Publisher resources

Download Example Code

Table of contents

  1. Unity Certified Programmer Exam Guide Second Edition
  2. Contributors
  3. About the author
  4. About the reviewers
  5. Preface
    1. Who this book is for
    2. What this book covers
    3. To get the most out of this book
    4. System requirements
    5. Download the example code files
    6. Code in Action
    7. Download the color images
    8. Conventions used
    9. Get in touch
    10. Share Your Thoughts
  6. Chapter 1: Setting Up and Structuring Our Project
    1. The core exam skills covered in this chapter
    2. Technical requirements
    3. The six core objectives
      1. Programming core interactions
      2. Working in the art pipeline
      3. Developing application systems
      4. Programming for the scene and environment design
      5. Optimizing performance and platforms
      6. Working in professional software development teams
    4. Overview of design patterns
      1. Builder
      2. Singleton
      3. Abstract Factory
      4. Prototype 
      5. Object Pool
      6. Dependency Injection
    5. The SOLID principles
      1. Single responsibility principle
      2. Open/closed principle
      3. Liskov substitution principle
      4. Interface segregation principle
      5. Dependency inversion principle
    6. Designing the Killer Wave game
      1. Game design brief
    7. The Killer Wave game framework
      1. Framework
    8. Setting up Unity
      1. Starting our project through Unity Hub
      2. The dashboard
    9. Summary
  7. Chapter 2: Adding and Manipulating Objects
    1. Core exam skills covered in this chapter
    2. Technical requirements
    3. Setting up our Unity project
      1. Creating prefabs
      2. Adding Rigidbody components and fixing game objects
      3. Saving and publishing our work
      4. Unity Editor Layout
      5. Setting up our light
    4. Introducing our interface – IActorTemplate
    5. Introducing our ScriptableObject – SOActorModel
      1. Creating a PlayerSpawner ScriptableObject asset
      2. Creating an EnemySpawner ScriptableObject asset
      3. Creating a PlayerBullet ScriptableObject Asset
    6. Setting up our Player, PlayerSpawner, and PlayerBullet scripts
      1. Setting up our PlayerSpawner script
      2. Setting up our Input Manager
      3. Setting up our Player script
      4. Setting up our PlayerBullet script
    7. Planning and creating our enemy
    8. Setting up our EnemySpawner and Enemy scripts
      1. Adding our script to the EnemySpawner game object
      2. Setting up our enemy script
    9. Summary
  8. Chapter 3: Managing Scripts and Taking a Mock Test
    1. The core exam skills covered in this chapter
    2. Technical requirements
    3. Adding a Singleton design pattern
      1. Adding the ResetScene() method
      2. Adding the GameOver() method
      3. Adding the BeginGame() method
    4. Creating lives for the player
    5. Scoring enemy hits
      1. Preparing the code for the ScoreManager script
      2. Setting up our ScoreManager script
    6. Creating sounds for the player's bullets
    7. Summary
    8. Mock test
  9. Chapter 4: Applying Art, Animation, and Particles
    1. The core exam skills covered in this chapter
    2. Technical requirements
    3. Adding visuals to the player's ship prefab
      1. Creating a material for our player's ship prefab
      2. Applying maps to our PlayerShip material
      3. Adding neon lights to our PlayerShip prefab
      4. Adding particles to our PlayerShip prefab
    4. Creating a Particle Effect
      1. Setting up the Emission section of our particle system
      2. Setting up the Shape section of our particle system
      3. Setting up the Force over Lifetime section of our particle system
      4. Setting up the Renderer section of our particle system
      5. Setting up the Texture Sheet Animation section of our particle system
    5. Importing and animating the background
      1. Adding an Animator Controller
      2. Creating states in the Animator Controller
      3. Animation
    6. Animating our three-dimensional enemies
    7. Summary
  10. Chapter 5: Creating a Shop Scene for Our Game
    1. The core exam skills covered in this chapter
    2. Technical requirements
    3. Introducing our shop scripts
      1. Importing and calibrating our sprite game object
      2. Displaying credit on our itemText game object
      3. Project file diagnosis when making SelectionQuad
    4. Customizing our shop selection
      1. Creating selection templates
      2. Customizing our player ship's upgrade selection
    5. Selecting game objects with raycasts
    6. Adding information to our description panel
    7. Summary
  11. Chapter 6: Purchasing In-Game Items and Advertisements
    1. The core exam skills covered in this chapter
    2. Technical requirements
    3. Buying upgrades for our player's ship
      1. Updating visual representations of our player's ship
      2. Preparing our player's ship to be used in the game
    4. Buying items, watching adverts, and preparing to start a game
      1. Setting up the BUY? button
      2. Setting up the START button
      3. Setting up the WATCH AD button
    5. Extending the PlayerSpawner script
    6. Summary
  12. Chapter 7: Creating a Game Loop and Mock Test
    1. Core exam skills covered in this chapter
    2. Technical requirements
    3. Transitioning our player ship
      1. Adding variables to our PlayerTransition script
      2. Adding methods/functions to our PlayerTransition script
      3. Adding if statement checks
      4. Adding content to the PlayerMovement method
      5. Moving the player ship out of the screen
    4. Expanding our ScenesManager script 
      1. Adding a game level timer
      2. Beginning, resetting, and skipping levels
    5. Preparing to loop our game
      1. Setting up the bootUp scene
      2. Setting up the title and gameOver scenes
      3. Demonstrating that the game loop is complete
    6. Summary
    7. Mock test
  13. Chapter 8: Adding Custom Fonts and UI
    1. Core exam skills being covered in this chapter
    2. Technical requirements
    3. Introducing the Canvas and UI
    4. Applying text and images to our scenes
      1. Improving our title scene
      2. Duplicating our game objects
      3. Preparing to animate UI game objects
      4. Animating our UI level title
    5. Summary
  14. Chapter 9: Creating a 2D Shop Interface and In-Game HUD
    1. Core exam skills covered in this chapter
    2. Technical requirements
    3. Setting up our HUD
      1. Displaying the player's lives
      2. Displaying the player's score
      3. Creating a mini-map
    4. Making our shop scene support alternative screen ratios
      1. Upgrading our shop selection
    5. Applying and modifying our shop script
      1. Reviewing the button's results
    6. Summary
  15. Chapter 10: Pausing the Game, Altering Sound, and a Mock Test
    1. Core exam skills covered in this chapter
    2. Technical requirements
    3. Applying and adjusting level music
      1. Updating our GameManager prefab
      2. Preparing states for our game music
      3. Implementing our game's music states
      4. Using StartCoroutine with our music states
    4. Creating a pause screen
      1. Adding a volume UI slider to the Pause screen
    5. Adding a game pause button
      1. Creating our PauseComponent script 
      2. PauseScreen basic setup and PauseButton functionality 
      3. Resuming or quitting the game from the pause screen
      4. Pausing the player and enemies
    6. Summary
    7. Mock test
  16. Chapter 11: Storing Data and Audio Mixer
    1. Core exam skills covered in this chapter
    2. Technical requirements
    3. Using the Audio Mixer
      1. Attaching the Audio Mixer to UI sliders
    4. Storing data
      1. PlayerPrefs and volume settings
      2. JSON and storing game stats
      3. Adding JSON variables
    5. Summary
  17. Chapter 12: NavMesh, Timeline, and a Mock Test
    1. The core exam skills covered in this chapter
    2. Technical requirements
    3. Preparing the final scene
    4. Developing AI with NavMesh
      1. Customizing our agents – NavMeshAgent
      2. Adding a capsule collider to our fleeing enemy
      3. Creating our fleeing enemy script
    5. Exploring the timeline
      1. Creating a timeline
      2. Setting up the boss game object in our scene
      3. Preparing the boss for the timeline
      4. Animating the boss in the timeline – phase one
      5. Animating the boss in the timeline – phase two
    6. Extending the timeline
      1. Adding Default Playables to the project
      2. Manipulating light components in the timeline
    7. Summary
    8. Mock test
  18. Chapter 13: Effects, Testing, Performance, and Alt Controls
    1. Core exam skills being covered in this chapter
    2. Technical requirements
    3. Applying physics with RigidBody
    4. Customizing for different platforms
      1. Navigating and firing the player's ship with the touchscreen
      2. Extending screen ratio support
    5. Preparing to build Killer Wave for mobile
      1. Setting up the lighting for Killer Waves for Android
      2. Stopping involuntary player controls
      3. Final optimizations for Killer Wave
      4. Setting up the build settings for Android
    6. Applying PC visual improvements
      1. Post-processing
    7. Adding global illumination and other settings
      1. Adding art assets to our shop scene
      2. Reflection probe
    8. Building and testing our game
      1. Tackling bugs
      2. Understanding the Profiler tools
      3. Frame Debugger
      4. Tackling bugs – answers
    9. Summary
  19. Chapter 14: Full Unity Programmer Mock Exam
    1. Full mock exam
  20. Appendix
    1. Developing for Virtual Reality
    2. Closing suggestions for the game/exam
      1. Rendering paths
      2. Adding to/optimizing Killer Wave
    3. Mock answers
      1. Chapter 3, Managing Scripts and Taking a Mock Test
      2. Chapter 7, Creating a Game Loop and Mock Test
      3. Chapter 10, Pausing the Game, Altering Sound, and a Mock Test
      4. , NavMesh, Timeline, and a Mock Test
      5. Chapter 14, Full Unity Programmer Mock Exam
    4. Why subscribe?
  21. Other Books You May Enjoy
    1. Packt is searching for authors like you
    2. Share Your Thoughts

Product information

  • Title: Unity Certified Programmer Exam Guide - Second Edition
  • Author(s): Philip Walker
  • Release date: May 2022
  • Publisher(s): Packt Publishing
  • ISBN: 9781803246215