Loot Object Receiver
This type of component is responsible for information when hovering over the selected object.
Each selected item has its own Canvas, which requires additional configuration.
And so let's take a look at all the components we need in order:
He is responsible for ensuring that the canvas always looks at the player.
We can set the target via the object tag.
We can pass the target that the Canvas will look at manually.
Responsible for the position of the canvas relative to the object.
Responsible for animating the appearance and disappearance of the canvas.
This component is needed in order to place the camera in the Canvas component.
It is responsible for displaying a certain UI element when receiving a corresponding message from the selected item.
The selected weapon has several messages:
- 1.Inventory Full - the inventory is full, it is impossible to pick up an item.
- 2.Loot Available - there is a place in the inventory, you can pick up an item.
- 3.Replace - such an item is already in the inventory, change the item.
In order to add a new message display, click on the plus sign.
In the window that appears, specify the text of the message and a link to the UI element with the text prepared for this message.
Here we put a link to the Loot Weapon component of the selected item.
This component is responsible for displaying the selection button.
This component processes the click of the selection button and fills the selection bar.
Loot Object - a link to the Loot Weapon component of the selected item.