Assign New Inventory Objects to the Player
Last updated
Last updated
Let's look at how to assign new inventory objects in the player’s inventory manager. Once the new inventory is created, to be usable by the player follow these steps:
Go to Player Controller gameObject.
Go to the inspector Inventory Manager and open the Inventory Manager List.
Press the button Add object.
Configure a name for the object that you want to add from the Inventory List Manager and the amount.
Press the button Get Inventory Manager List, to get all the inventory objects configured in the Inventory List Manager (this need to be done every time a new inventory object has been added if you want to add it to the player’s inventory).
You can check the difference between the list show in the field Object Name before and after.
Finally, in the field Object Name, select the new object created in the Inventory List Manager (or the one you need from the previous elements in that list).
To check if everything works, press play an open the inventory menu (by default is the I key). The new inventory object (in this case, the red wire) is shown in the grid and it contains the information configured, the amount, it can be used and dropped.