# Implement Heroes In-Game

It is important to note that Hero ID's are globally unique!

## Create Heroes

Create a Hero Character based on a Hero Class.

{% tabs %}
{% tab title="Unity" %}

```csharp
int heroID = 1;
string heroName = "Mage";

LootLockerSDKManager.CreateHero(heroID, heroName, true,(response) =>
{
    if (!response.success)
    {
        Debug.Log("Could not create Hero");
        return;
    }

});
```

To see what data gets returned, please refer to our [Reference Documentation](https://ref.lootlocker.com/game/api-5291448).
{% endtab %}

{% tab title="Unreal" %}

<figure><img src="/files/TtUha2xOK2toCuDYWPA1" alt=""><figcaption><p><a href="https://blueprintue.com/blueprint/n2zuju8w/">Blueprint example of Creating a Hero</a></p></figcaption></figure>
{% endtab %}
{% endtabs %}

## Update Heroes

Update a Hero's name or default setting.

{% tabs %}
{% tab title="Unity" %}

```csharp
string heroID = "1";
string heroName = "Mage";

LootLockerSDKManager.UpdateHero(heroID, heroName, true, (response) =>
{
    if (!response.success)
    {
        Debug.Log("Could not update Hero");
        return;
    }
});
```

To see what data gets returned, please refer to our [Reference Documentation](https://ref.lootlocker.com/game/api-5291453).
{% endtab %}

{% tab title="Unreal" %}

<figure><img src="/files/4z6SGAYXzzgigQjxd7nQ" alt=""><figcaption><p><a href="https://blueprintue.com/blueprint/8crrn7p6/">Blueprint example of Updating a Hero</a></p></figcaption></figure>
{% endtab %}
{% endtabs %}

## List Player Heroes

Use this API to list all Heroes associated to a player.

{% tabs %}
{% tab title="Unity" %}

```csharp
LootLockerSDKManager.ListPlayerHeroes((response) =>
{
    if (!response.success)
    {
        Debug.Log("Could not list Player Heroes");
        return;
    }
});
```

To see what data gets returned, please refer to our [Reference Documentation](https://ref.lootlocker.com/game/api-5291449).
{% endtab %}

{% tab title="Unreal" %}

<figure><img src="/files/7MAyP1xIqr6B8BYYroT7" alt=""><figcaption><p><a href="https://blueprintue.com/blueprint/yz6oh6n2/">Blueprint example of listing player Heroes</a></p></figcaption></figure>
{% endtab %}
{% endtabs %}

## List Game Heroes

List all Heroes associated to the specific game.

{% tabs %}
{% tab title="Unity" %}

```csharp
LootLockerSDKManager.GetGameHeroes((response) =>
{
    if (!response.success)
    {
        Debug.Log("Could not get Game Heroes");
        return;
    }
});
```

To see what data gets returned, please refer to our [Reference Documentation](https://ref.lootlocker.com/game/api-5291447).
{% endtab %}

{% tab title="Unreal" %}

<figure><img src="/files/dY1jy7iY30DqGJqCBn6q" alt=""><figcaption><p><a href="https://blueprintue.com/blueprint/g0djz7tk/">Blueprint example of Listing Game Heroes</a></p></figcaption></figure>
{% endtab %}
{% endtabs %}

## Get Hero Loadout

Use this API to retrieve a Loadout of a specific Player Hero.

{% tabs %}
{% tab title="Unity" %}

```csharp
LootLockerSDKManager.GetHeroLoadout((response) =>
{
    if (!response.success)
    {
        Debug.Log("Could not get Hero Loadout");
        return;
    }
});
```

To see what data gets returned, please refer to our [Reference Documentation](https://ref.lootlocker.com/game/api-10177964).
{% endtab %}

{% tab title="Unreal" %}

<figure><img src="/files/K2W37CD9p7IkSeyC5Hg0" alt=""><figcaption><p><a href="https://blueprintue.com/blueprint/hsuy486p/">Blueprint example of Getting Hero Loadout</a></p></figcaption></figure>
{% endtab %}
{% endtabs %}

## Get Other Player's Hero Loadout

Retrieve another Players' Hero's Loadout.

{% tabs %}
{% tab title="Unity" %}

```csharp
int heroID = 2;
LootLockerSDKManager.GetOtherPlayersHeroLoadout(heroID, (response) =>
{
    if (!response.success)
    {
        Debug.Log("Could not get Hero Loadout");
        return;
    }

});
```

{% endtab %}

{% tab title="Unreal" %}

<figure><img src="/files/StmGVpekIR7atMpKNIoJ" alt=""><figcaption><p><a href="https://blueprintue.com/blueprint/97sevemh/">Blueprint example of getting other Players Hero Loadout</a></p></figcaption></figure>
{% endtab %}
{% endtabs %}

## Equip Asset to Hero

Equip an Asset to a player's Hero.

{% tabs %}
{% tab title="Unity" %}

```csharp
int heroID = 2;
int assetInstanceID = 152;
LootLockerSDKManager.AddAssetToHeroLoadout(heroID, assetInstanceID, (response) =>
{
    if (!response.success)
    {
        Debug.Log("Could not add Asset to Hero Loadout");
        return;
    }

});
```

To see what data gets returned, please refer to our [Reference Documentation](https://ref.lootlocker.com/game/api-5291450).
{% endtab %}

{% tab title="Unreal" %}

<figure><img src="/files/GvNBim6aO7AJF5DUkEIn" alt=""><figcaption><p><a href="https://blueprintue.com/blueprint/vmu354i5/">Blueprint example of Equipping an Asset to Hero</a></p></figcaption></figure>
{% endtab %}
{% endtabs %}

## Unequip Asset from Hero

Use this API call to unequip an Asset from a Hero.

{% tabs %}
{% tab title="Unity" %}

```csharp
string heroID = "2";
int assetInstanceID = 152;
LootLockerSDKManager.RemoveAssetFromHeroLoadout(assetInstanceID, heroID, (response) =>
{
    if (!response.success)
    {
        Debug.Log("Could not unequip Asset to Hero Loadout");
        return;
    }

});
```

To see what data gets returned, please refer to our [Reference Documentation](https://ref.lootlocker.com/game/api-10178017).
{% endtab %}

{% tab title="Unreal" %}

<figure><img src="/files/o0RrdCcZOJftFPKcdEpm" alt=""><figcaption><p><a href="https://blueprintue.com/blueprint/xmjfqjsd/">Blueprint example for unequipping an Asset from Hero</a></p></figcaption></figure>
{% endtab %}
{% endtabs %}


---

# 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://docs.lootlocker.com/game-systems/classes-and-heroes/how-to/implement-heroes-in-game.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.
