Unity Certified Programmer: Exam Guide
eBook - ePub

Unity Certified Programmer: Exam Guide

Expert tips and techniques to pass the Unity certification exam at the first attempt

  1. 758 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Unity Certified Programmer: Exam Guide

Expert tips and techniques to pass the Unity certification exam at the first attempt

About this book

A practical guide to Unity game scripting using C#, backed with practice tests, exam tips, and easy-to-follow examples to help you better prepare for the exam and become a pro in Unity programming

Key Features

  • Discover the essentials of game scripting with Unity and C# to customize every aspect of your game
  • Overcome challenges in Unity game development using effective techniques and easy solutions
  • Pass the Unity certification exam with the help of 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 also enable you to be part of the Unity community.

This study guide will start by building on your understanding of C# programming and take you through the process of downloading and installing Unity. You'll understand how Unity works and get to grips with the core objectives of the Unity exam. 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 recent 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 understand how 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 that interact with Unity's Rendering API
  • Explore Unity APIs for adding lighting, materials, and texture to your apps
  • Write Unity scripts for building interfaces for menu systems, UI navigation, application settings, and much more
  • Delve into SOLID principles for writing clean and maintainable Unity applications

Who this book is for

The book is for game developers, software developers, mobile app developers, and Unity developers who want to advance in the game or related industry. Basic knowledge of C# programming and Unity engine is required.

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription.
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
Perlego offers two plans: Essential and Complete
  • Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
  • Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes! You can use the Perlego app on both iOS or Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app.
Yes, you can access Unity Certified Programmer: Exam Guide by Philip Walker in PDF and/or ePUB format, as well as other popular books in Computer Science & Certification Guides in Computer Science. We have over one million books available in our catalogue for you to explore.
Adding and Manipulating Objects
In the previous chapter, we discussed the importance of the Official Unity Programmer exam and what benefits it can produce for any developer who is looking to reassure either themselves or others in understanding programming in Unity. We also discussed the building blocks of being a programmer in general and our game's design brief.
As we are programmers working on a game engine, it is likely you will be working for a range of industries. In many of these industries, you will be issued with a technical brief/documentation (well, you should be!) for building the application. With this project, we are making a game and the game design brief is effectively the blueprint for making this game. In this chapter, we will be applying the majority of our code, game objects, prefabs, and more, based on the guidance of the brief and the game framework. We will be reminding ourselves of the brief and game framework during this chapter and will transfer specific information across into our code.
With regard to our code, we will be covering the importance of interfaces and scriptable objects to help structure and uniform our code to help it from bloating unnecessarily, which we covered in Chapter 1, Setting Up and Structuring Our Project with SOLID principles. We will also be getting used to the Unity editor and becoming familiar with game objects, prefabs, and importing three-dimensional models to animate.
In this chapter, we'll be covering the following topics:
  • Setting up our Unity project
  • Introducing our interface (IActorTemplate)
  • Introducing our ScriptableObject (SOActorModel)
  • Setting up our Player, PlayerSpawner, and PlayerBullet scripts
  • Planning and creating our enemy
  • Setting up our EnemySpawner and enemy script
The next section will outline the exam objectives covered in this chapter.

Core exam skills covered in this chapter

Programming core interactions
  • Implement and configure game object behavior and physics.
  • Implement and configure inputs and controls.
  • Implement and configure camera views and movement.
Working in the art pipeline
  • Understand lighting, and write scripts that interact with Unity’s lighting API.
  • Understand two- and three-dimensional animation, and write scripts that interact with Unity’s animation API.
Programming for scene and environment design
  • Identify methods for implementing game object instantiation, destruction, and management.
Working in professional software development teams
  • Recognize concepts associated with the uses and impact of version control, using technologies such as Unity Collaborate.
  • Demonstrate knowledge of developer testing and its impact on the software development process, including Unity Profiler and traditional debugging and testing techniques.
  • Recognize techniques for structuring scripts for modularity, readability, and re-usability.

Technical requirements

The project content for this chapter can be found at https://github.com/PacktPublishing/Unity-Certified-Programmer-Exam-Guide/tree/master/Chapter02.
You can download the entire chapter project files at https://github.com/PacktPublishing/Unity-Certified-Programmer-Exam-Guide/archive/master.zip.
All content for this chapter is held in the relevant unitypackage file, including a Complete folder that contains all of the work we'll carry out in the chapter, so if at any point you need some reference material or extra guidance, be sure to check it out.
Check out the following video to see the Code in Action: https://bit.ly/3i2OnW6.

Setting up our Unity project

Things can get messy quickly in a project if we don't manage our files correctly by placing them into the allocated folders. If you want to structure your folders your own way, or during the book you decide to stray away from how I'm doing it, that's also fine. Just try and be conscious of your future self or other people working on this project when it comes to finding and organizing files.
Open the project up if you haven't already and create the following folders:
  1. Model contains 3D models (player ship, enemies, bullets, and so on).
  2. Prefab holds instances of game objects (these are created within Unity).
  3. Scene stores our first-level scene as well as other levels.
  4. Script contains all of our code.
  5. Material stores our game object materials.
You should know what a prefab is, as it's one of the main parts of what makes Unity so quick and easy to use. However, if you don't: it's typically your game object with its settings and components stored in an instance. You can store your game objects in your Project window as prefabs by dragging the game object from the Hierarchy window. A blue box icon will be generated following the game object's name, and if you select the prefab in the Project window, its Inspector window details will show all its stored values. If you would like to know more about prefabs, you can check out the documentation at https://docs.unity3d.com/Manual/Prefabs.html.
The following screenshot shows you how to create these folders:
Follow the steps given below:
  1. Within our Prefab folder, create another two folders, Enemies and Player.
  2. Inside the Script folder, create a folder called ScriptableObject.
  3. Create a folder in the Assets folder called Resources, and move our Model, Prefab, Script, and Material folders into it. The following screenshot shows what our folder structure should look like now:
Resources is a special folder that Unity recognizes. It will allow us to load assets while the game is running. For more information about the Resources folder, check the documentation at https://docs.unity3d.com/Manual/BestPracticeUnderstandingPerformanceInUnity6.html.
Provided in the Technical requirements section is the download link for the GitHub repository of this chapter. Once downloaded, double-click the Chapter2.unitypackage file and we will be given a list of assets to import into our Unity project:
  • Player_ship.fbx
  • enemy_wave.fbx
The following screenshot shows the import window of the assets we are about to bring into our project:
Make sure all assets are ticked and click the Import button in the bottom-right corner of the window. We can now move on ...

Table of contents

  1. Title Page
  2. Copyright and Credits
  3. About Packt
  4. Contributors
  5. Preface
  6. Setting Up and Structuring Our Project
  7. Adding and Manipulating Objects
  8. Managing Scripts and Taking a Mock Test
  9. Applying Art, Animation, and Particles
  10. Creating a Shop Scene for Our Game
  11. Purchasing In-Game Items and Advertisements
  12. Creating a Game Loop and Mock Test
  13. Adding Custom Fonts and UI
  14. Creating a 2D Shop Interface and In-Game HUD
  15. Pausing the Game, Altering Sound, and a Mock Test
  16. Storing Data and Audio Mixer
  17. NavMesh, Timeline, and a Mock Test
  18. Effects, Testing, Performance, and Alt Controls
  19. Full Unity Programmer Mock Exam
  20. Appendix
  21. Other Books You May Enjoy