In the PlayerInventory script class, the variable inventory is a C# List<>. This is a flexible data structure that can be sorted, searched, and dynamically (at runtime, when the game is being played) have items added to and removed from it. <PickUp>, which is in pointy brackets, means that the variable inventory will contain a list of PickUp objects. For this recipe, our PickUp class just has a single field – a string description – but we'll add more sophisticated data items to the PickUp classes we'll look at in later recipes. This variable inventory has been initialized to be a new, empty C# List of PickUp objects.
Before the scene starts, the Awake() method of the Player script class caches a reference to the PlayerInventoryDisplay scripted component.
When the scene starts, the Start() method invokes the OnChangeInventory(...) method of the PlayerInventoryDisplay scripted component. This is...