In this chapter, we will incorporate and extend the scriptable objects that heavily helpedmake our player and the enemy ships in the previous chapter. We will customize a new shop scene, where we will add new upgrades for the player's ship with the use of scriptable objects.
We will also look at the common uses of raycasts; if you aren't familiar with them, they're best described as an invisible laser that shoots from one point to another:
When the ray hits a game object with a collider, it can retrieve information about the object, and then we can go a little further and manipulate the object we've hit. For example, we can cast a ray to a game object cube and the ray will confirm to us that it's a cube. Because we have the cube's reference, we could change its color, scale, or position or destroy it—we could pretty...