Book Image

Unity Certified Programmer: Exam Guide

By : Philip Walker
Book Image

Unity Certified Programmer: Exam Guide

By: Philip Walker

Overview of this book

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.
Table of Contents (17 chapters)
14
Full Unity Programmer Mock Exam

Buying items, watching adverts, and preparing to start a game

In this section, we will look at adding three more buttons to our shop scene. The first is BUY? for when we want to purchase an item. The second is Watch Ad—as soon as the player presses this button, an advert will load; once it's finished, the player is rewarded with 300 credits. Lastly, the START button, which will take the player to the testLevel scene with the upgrades they have purchased (if any).

We need to head back to the PlayerShipBuild script and scroll down to the AttemptSelection method, where we will add three else if statements to launch three different types of methods. The reason for this is that the three selections don't follow on from the scriptable object buttons; therefore, these items will never have outcomes such as SOLD or itemText.

The following screenshot shows the complete AttemptSelection method with the focus drawn to the other three non-scriptable object...