> For the complete documentation index, see [llms.txt](https://docs.proudnet.com/proudnet.eng/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.proudnet.com/proudnet.eng/proud_service/proudchat/download/unreal-engine-4.md).

# Unreal Engine 4

Download the ProudChat Unreal Engine 4 SDK from the link below.

## :open\_file\_folder: [Unreal Engine 4 ProudChat SDK](https://github.com/Nettention/ProudChatSDK/tree/main/ChatClientSDK/Unreal)

## Project settings

### - Plugins settings

In the project root folder, create a new <mark style="color:orange;">Plugins</mark> folder and copy the downloaded SDK file to the Plugins folder you created.

<figure><img src="/files/rMhDPRu1F84EfFEPxCZ0" alt=""><figcaption></figcaption></figure>

In the Unreal Editor, press <mark style="color:orange;">Edit</mark> -> <mark style="color:orange;">Plugins</mark> to check whether the ProudChat plugin you copied is enabled in the Plugin Browser tab.

<figure><img src="/files/rd0c3SB0fGPlyaQMuHoR" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
If you don't see the ProudChat plugin in the Unreal Editor after copying it to the Plugins folder, you can check by exiting and re-launching the editor.
{% endhint %}

### - Setting Up Blueprint Classes

After the plugin is successfully installed, the <mark style="color:orange;">ProudChat C++ class</mark> Browser in the Unreal Editor creates a 'Blueprint class' based on the <mark style="color:orange;">ProudChatActor</mark> class.

<figure><img src="/files/osTRAuEIjQOETeQAwDYg" alt=""><figcaption></figcaption></figure>

In the Event Graph of the 'Blueprint class' you created, create an <mark style="color:orange;">Init</mark> function for Proud Chat, connect it to the <mark style="color:orange;">BeginPlay</mark> event, and enter the <mark style="color:orange;">Account UUID</mark>, <mark style="color:orange;">Project UUID</mark>, and User <mark style="color:orange;">UniqueID</mark> that you received from the Proud Console.

<figure><img src="/files/yYy7gEyXsJklqiEMPFU5" alt=""><figcaption></figcaption></figure>

After compiling the event by pressing the Compile button, place the created 'Blueprint Class' in your Level and press Play to see if it connects to the server.

<figure><img src="/files/YuKtRm6V47JD2JxQldmv" alt=""><figcaption></figcaption></figure>

If the connection is successful, ProudChat Connection Success is displayed in the top-left corner of the level.

<figure><img src="/files/OUFP5J2hgckB4BJXgAhb" alt=""><figcaption></figcaption></figure>

## ProudChatActor

### - ProudChatActor::Init

This is the part that initializes ProudChat. The user must call the <mark style="color:orange;">Init</mark> function to connect to the server before using it.

<table data-full-width="false"><thead><tr><th width="134">Function Name</th><th width="278">Parameters</th><th>Description</th></tr></thead><tbody><tr><td>Init</td><td>The user's UUID provided in the <a href="https://console.nettention.com"><strong>Proud Console</strong></a>, the UUID of the project the user created, and the user's own UniqueID.</td><td>The user writes this part of the function to connect ProudChat.<br>We're taking 3 strings as parameters, but internally we're calling the <mark style="color:orange;">ChatClientInitComplete</mark>,  <mark style="color:orange;">ChatClientInitFailed</mark> events via <mark style="color:orange;">std::bind</mark> so we can see if the login succeeded or failed.</td></tr></tbody></table>

### - Disconnect

<table data-full-width="false"><thead><tr><th width="186">Function Name</th><th width="206">Parameters</th><th>Description</th></tr></thead><tbody><tr><td>Disconnect</td><td>-</td><td>Use when you want to disconnect with the chat server.</td></tr></tbody></table>

### - Functions

<table data-full-width="false"><thead><tr><th width="204">Function Name</th><th width="317">Parameters</th><th>Description</th></tr></thead><tbody><tr><td>IsConnected</td><td>-</td><td>Use when you check the status of server connection.</td></tr><tr><td>JoinChannel</td><td>Unique key for the channel you want to access</td><td>Use when you want to access a specific channel.</td></tr><tr><td>LeaveChannel</td><td>Unique key for the channel you want to leave</td><td>Use this when you want to leave the channel you're in.</td></tr><tr><td>SendChannelMsg</td><td>A unique identification value for a specific channel, a message to send to the specific channel</td><td>Use to send a message to a specific channel.</td></tr><tr><td>SendDirectMsg</td><td>A unique identification value for a specific recipient, a message to send to the specific party</td><td>Use to send a message to a specific person.</td></tr><tr><td>MsgTranslate</td><td><p>src = The country code of current language</p><p>target = The country code of the targeting language</p><p>msgKey = A unique key of message to translate</p><p>msg = A message to translate</p></td><td>(Beta) Use when you want to translate the message</td></tr><tr><td>MsgTranslate_Auto</td><td><p>target = The country code of the targeting language</p><p>msgKey = A unique key of message to translate </p><p>msg = A message to translate</p></td><td>(Beta) Request the translation of the message after automatically detecting the language.</td></tr><tr><td>MsgRecord_Channel</td><td>channelKey = A unique key of the channel<br>day = The days (max 90)<br>cnt = The counts (max 100)</td><td>(Beta) Request the chat data from the Channel. <br>Retrieve up to 100 messages within the last 90 days.</td></tr><tr><td>MsgRecord_Direct</td><td>target = A unique key of the target user<br>day = The days (max 90)<br>cnt = The counts (max 100)</td><td>(Beta) Request the data from the Direct messages.<br>Retrieve up to 100 messages within the last 90 days.</td></tr><tr><td>MsgRecord_Notice</td><td>day = The days (max 90)<br>cnt = The counts (max 100)</td><td>(Beta) Request the data from the Notice.<br>Retrieve up to 100 messages within the last 90 days.</td></tr></tbody></table>

### - Event Variables (C++)

<table data-full-width="false"><thead><tr><th width="309">Event variable name</th><th>Description</th></tr></thead><tbody><tr><td>InitComplete_Delegate</td><td>Event called when <mark style="color:orange;">Init Complete</mark> completes.</td></tr><tr><td>InitFailed_Delegate</td><td>Events called when <mark style="color:orange;">Init Failed</mark>.</td></tr><tr><td>ChatDisconnect_Delegate</td><td>Event fired when the chat server <mark style="color:orange;">disconnected</mark>. </td></tr><tr><td>ChannelMsg_Response_Delegate</td><td>It handles events that occur if a <mark style="color:orange;">ChannelMsg</mark> arrives.</td></tr><tr><td>DirectMsg_Response_Delegate</td><td>It handles events if the <mark style="color:orange;">DirectMsg</mark> arrives between users.</td></tr><tr><td>Notice_Response_Delegate</td><td>It will be called when you send <mark style="color:orange;">Notice</mark> from Proud Console.</td></tr><tr><td>Channel_Join_Success_Delegate</td><td>It will be called if <mark style="color:orange;">Channel Join Success</mark> occurs.</td></tr><tr><td>Channel_Join_Failed_Delegate</td><td>It will be called if <mark style="color:orange;">Channel Join Failed</mark> occurs.</td></tr><tr><td>Channel_Leave_Success_Delegate</td><td>It will be called if <mark style="color:orange;">Channel Leave Success</mark> occurs.</td></tr><tr><td>Channel_Leave_Failed_Delegate</td><td>It will be called if <mark style="color:orange;">Channel Leave Failed</mark> occurs.</td></tr><tr><td>MsgTranslate_Success_Delegate</td><td>(Beta) It will be called if the message is successfully translated.</td></tr><tr><td>MsgTranslate_Failed_Delegate</td><td>(Beta) It will be called if the message translation fails.</td></tr><tr><td>MsgRecord_Success_Delegate</td><td>(Beta) It will be called if the data history is successfully retrieved.</td></tr><tr><td>MsgRecord_Failed_Delegate</td><td>(Beta) It will be called if the data history retrieval fails.</td></tr></tbody></table>

### - Event Variables (Blueprint)

<table data-full-width="false"><thead><tr><th width="237">Event variable name</th><th>Description</th></tr></thead><tbody><tr><td>ChatClientInitComplete</td><td>It will be called if the server successfully connects with the ChatClient.</td></tr><tr><td>ChatClientInitFailed</td><td>It will be called on server login failure.</td></tr><tr><td>ChatDisconnect</td><td>It will be called if the server disconnects with the ChatClient.</td></tr><tr><td>ChannelMsg_Response</td><td>It handles events that occur if a <mark style="color:orange;">ChannelMsg</mark> arrives.</td></tr><tr><td>DirectMsg_Response</td><td>It handles events if the <mark style="color:orange;">DirectMsg</mark> arrives between users.</td></tr><tr><td>Notice_Response</td><td>It will be called when you send <mark style="color:orange;">Notice</mark> from Proud Console.</td></tr><tr><td>Channel_Join_Success</td><td>It will be called if <mark style="color:orange;">Channel Join Success</mark> occurs.</td></tr><tr><td>Channel_Join_Failed</td><td>It will be called if <mark style="color:orange;">Channel Join Failed</mark> occurs.</td></tr><tr><td>Channel_Leave_Success</td><td>It will be called if <mark style="color:orange;">Channel Leave Success</mark> occurs.</td></tr><tr><td>Channel_Leave_Failed</td><td>It will be called if <mark style="color:orange;">Channel Leave Failed</mark> occurs.</td></tr><tr><td>MsgTranslate_Success</td><td>(Beta) It will be called if the message is successfully translated.</td></tr><tr><td>MsgTranslate_Failed</td><td>(Beta) It will be called if the message translation fails.</td></tr><tr><td>MsgRecord_Success</td><td>(Beta) It will be called if the data history is successfully retrieved.</td></tr><tr><td>MsgRecord_Failed</td><td>(Beta) It will be called if the data history retrieval fails.</td></tr></tbody></table>

## Building

### - Android

Please refer to the links below.

{% hint style="info" %}
[<mark style="color:blue;">**Android Quickstart**</mark>](https://docs.unrealengine.com/5.3/ko/setting-up-unreal-engine-projects-for-android-development/)
{% endhint %}

### - iOS

{% hint style="info" %}
For more information, see [**Building iOS**](https://docs.proudnet.com/proudnet.eng/proud_service/proudchat/download/pages/xm2T2pMYsD8LM8oJ2Vsb#4.-ios)**.**
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.proudnet.com/proudnet.eng/proud_service/proudchat/download/unreal-engine-4.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
