# Initializing the HiroClient

**URL:** https://heroiclabs.com/docs/hiro/unreal/getting-started/hiro-client/
**Summary:** Learn how to initialize and use the HiroClient in Unreal.
**Keywords:** initializing the hiroclient, hiro client
**Categories:** hiro, unreal, hiro-client

---


# Installing Hiro in Unreal Engine

The Unreal client is available from Heroic Labs. [Contact us](mailto:contact@heroiclabs.com) to request access.

{{< note "important" >}}
Make sure to [install the Nakama plugin](https://github.com/heroiclabs/nakama-unreal?tab=readme-ov-file#installing-the-plugin) before continuing if you haven't done so already.
{{< /note >}}

The `Hiro.zip` file contains all source code and dependencies required in the client code.

After downloading the file, add the contents to your Unreal project's `Plugins` folder:

1. Open your Unreal project
2. Navigate to the `Plugins` folder, if one doesn't exist, create it
3. Extract the contents of the `Hiro.zip` file into the `Plugins` folder
   - Optionally, place the Hiro files into your Unreal Engine `Plugins` folder to use the plugin across multiple projects. For example:

```
Project
├──...
└──Plugins
   ├──...
   ├──Nakama
   │   ├──...
   │   └──Nakama.uplugin // ensure you have also installed Nakama
   └──Hiro
       ├──...
       └──Hiro.uplugin
```

4. Restart Unreal Engine
5. Go to **Edit** -> **Plugins** and make sure that both the Nakama and Hiro plugins are enabled.

![Enable the plugins in Unreal Engine]({{< fingerprint_image "/images/pages/hiro/client-libraries/unreal-plugins-example.png" >}})

## Initializing the HiroClient

To use Hiro in Unreal, you first need to create a `NakamaClient`. After that, you can initialize Hiro and create a `HiroClient` by passing in the previously created `NakamaClient`.

```cpp
#include "NakamaClient.h"
#include "HiroClient.h"

UNakamaClient* NakamaClient = UNakamaClient::CreateDefaultClient(TEXT("defaultkey"), TEXT("localhost"), 7350, false, true);
UHiroClient* HiroClient = UHiroClient::CreateDefaultClient(NakamaClient);
```
