Converting the pickups from the first course is actually more complicated than is worth considering. In the first course, the items were simply placed on the ground, and they weren’t communicating with the inventory system. Starting in Inventory, we’re using a pickup Spawner to put them on the ground.
We’ll start with the pickup itself. It’s not the item itself, it’s a representation of the item in the scene.
The easiest thing to do is in the Assets folder, copy (Cntrl-D) the Default Pickup in Game/Pickups and replace the bag mesh with the mesh of your choice. (Or, many students just use the default pickup).
A pickup will look like this:
You will add a link to the pickup prefab in the InventoryItem scriptable Object. This is how the Sword’s configuration looks:
In this case, the Sword pickup is assigned (which is just like the default pickup, but with a sword in place of the bag).
The pickup itself doesn’t have the information about what the item is. This will be added when the pickup is spawned by the PickupSpawner
The PickupSpawner itself is an empty GameObject (no mesh, or child objects)
It has the PickupSpawner component and the SaveableEntity component.
This is what you’ll place within the scene. Select the sword in the item drop down. When the game starts, it will spawn a pickup (unless it’s a saved scene where you’ve already picked up the pickup).