With these requirements in mind, let's build the framework for an interactive object that can be collected by the player.
We will begin with the
CustomGameObj class. This class allows us to specify how an interactive object will behave when placed in the inventory, by giving it a unique type that is relevant for our game. Create the script by performing the following steps: