Chapter 2: 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 an 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 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, preventing 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
, andPlayerBullet
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.