# Loot Object Receiver

This type of component is responsible for information when hovering over the selected object.

![](/files/-MdbEkU1rU1x6rlFq9LA)

Each selected item has its own Canvas, which requires additional configuration.

![](/files/-MdbFkzXYToDEv12G7Tg)

![](/files/-MdbFr2zn424aP9ICIv7)

And so let's take a look at all the components we need in order:

## UI Billboard Effect&#x20;

He is responsible for ensuring that the canvas always looks at the player.

### Automatically

We can set the target via the object tag.

![](/files/-MdbGELu7WmEGV0VLxbo)

{% hint style="success" %}
**Example:**

If we work in **Prefab**, then we can't manually specify the camera and then this method will help us, when initializing an object, the system will find an object with the necessary tag itself and the canvas will always look at it.
{% endhint %}

### Manual

We can pass the target that the Canvas will look at manually.

![](/files/-MdbGlPtKwtiu2T9LWYs)

## Rect Transform Placer

![](/files/-MdbHnE299kMPOPadVD8)

Responsible for the position of the canvas relative to the object.

{% hint style="success" %}
**Example:**

When we throw an object, the canvas is still static relative to the object, and does not rotate with it.
{% endhint %}

| Name            | Description                                                                                                                                                                                                                                                                                                  |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Side            | <p><strong>Top -</strong> canvas will be located above the object.</p><p><strong>Bottom -</strong> canvas will be located under the object.<br><strong>Left -</strong> canvas will be located to the left of the object.<br><strong>Right -</strong>  canvas will be located to the right of the object.</p> |
| Relative Object | A reference to the object.                                                                                                                                                                                                                                                                                   |

### Advanced Settings

![](/files/-MdbLF3Q4Lpd657Ief6_)

| Name      | Description                                                                           |
| --------- | ------------------------------------------------------------------------------------- |
| Smooth    | The speed of the canvas movement.                                                     |
| Tolerance | The value by which the canvas can deviate before returning to the specified position. |
| Offset    | The distance at which the canvas will be located from the object.                     |

## Rect Transform Resizer

![](/files/-MdbMd_gynH1ABqZ43f0)

Responsible for animating the appearance and disappearance of the canvas.

{% hint style="info" %}
All manipulations with the canvas size and so on occur through the code.
{% endhint %}

### Show Event

![](/files/-MdbN5OukXP5qW-Qr-Si)

| Name      | Description                                                                                                                                               |
| --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Component | Here we select the **LootWeapon** component.                                                                                                              |
| Event     | <p>Here we select the <strong>OnBecomeReceiverVisibleCallback</strong> event.<br>The event that must occur for the <strong>canvas</strong> to appear.</p> |
| Arg 1     | The time for which the animation of the **canvas** appearance will occur. **(in seconds)**                                                                |
| Arg 2     | The curve along which the **canvas** will appear.                                                                                                         |

### Hide Event

![](/files/-MdbNAxwZSyhK9b-5Kj7)

| Name      | Description                                                                                                                                                     |
| --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Component | Here we select the **LootWeapon** component.                                                                                                                    |
| Event     | <p>Here we select the <strong>OnBecomeReceiverVisibleCallback</strong> event.</p><p>The event that must occur for the <strong>canvas</strong> to disappear.</p> |
| Arg 1     | The time it takes for the **canvas** to disappear animation to occur. **(in seconds)**                                                                          |
| Arg 2     | The curve along which the **canvas** will disappear.                                                                                                            |

## Canvas Camera Initializer

![](/files/-MdbP-D_QKD8irSr8y2X)

This component is needed in order to place the camera in the Canvas component.

{% hint style="info" %}
Since we are working with Prefab, we do not have access to the camera and this component, when initialized by the tag, finds the camera and places it in the Canvas component.
{% endhint %}

![](/files/-MdbPrusdnWMwYW53LIC)

## Loot State UI

![](/files/-MdbQ3_RpoBDIb9eYfWZ)

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.

{% hint style="info" %}
The list of messages can be replenished, only default messages are specified here.
{% endhint %}

### **Add New States**

In order to add a new message display, click on the plus sign.

![](/files/-MdbSS57nRznCvaWN9VH)

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.

![](/files/-MdbSsUDL86eELdNVsr4)

### Loot Object&#x20;

Here we put a link to the Loot Weapon component of the selected item.

### Example

**Loot Available**&#x20;

![](/files/-MdbRiVQI2MT26qRsuLg)

**Inventory Full**

![](/files/-MdbRwx8YXIIxxXhPClW)

#### Replace

![](/files/-MdbS1IK_jQm2C0FRXrE)

## UI Element Visibility

![](/files/-MdbVQm1W9_YtA431lUM)

This component is responsible for displaying the selection button.

![](/files/-MdbVt0t-KPVYK0B-Z-6)

### Enable Callback

![](/files/-MdbW39xkio2jVKDjjDa)

| Name      | Description                                                                                                                 |
| --------- | --------------------------------------------------------------------------------------------------------------------------- |
| Component | Here we select the **LootWeapon** component.                                                                                |
| Event     | Here we select the **OnBecomeReceiverVisibleCallback** event. The event that must occur for the selection button to appear. |

### Disable Callback

![](/files/-MdbW5nfMpAfVqusdFRx)

| Name      | Description                                                                                                                                                                 |
| --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Component | Here we select the **LootWeapon** component.                                                                                                                                |
| Event     | <p>Here we select the <strong>OnBecomeReceiverVisibleCallback</strong> event.</p><p>This component is responsible for displaying the <strong>selection button</strong>.</p> |

## Loot Long Press Image Fill

![](/files/-MdbYmoU8j7zMXa62qlo)

This component processes the click of the selection button and fills the selection bar.

![](/files/-MdbZK-hoy2uD2tPDu9B)

**Loot Object** - a link to the **Loot Weapon** component of the selected item.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://renownedgames.gitbook.io/aurora-engine/ui/loot-object-receiver.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
