Unreal Engine 4
Last updated
Last updated
Download the ProudChat Unreal Engine 4 SDK from the link below.
In the project root folder, create a new Plugins folder and copy the downloaded SDK file to the Plugins folder you created.
In the Unreal Editor, press Edit -> Plugins to check whether the ProudChat plugin you copied is enabled in the Plugin Browser tab.
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.
After the plugin is successfully installed, the ProudChat C++ class Browser in the Unreal Editor creates a 'Blueprint class' based on the ProudChatActor class.
In the Event Graph of the 'Blueprint class' you created, create an Init function for Proud Chat, connect it to the BeginPlay event, and enter the Account UUID, Project UUID, and User UniqueID that you received from the Proud Console.
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.
If the connection is successful, ProudChat Connection Success is displayed in the top-left corner of the level.
This is the part that initializes ProudChat. The user must call the Init function to connect to the server before using it.
Function Name | Parameters | Description |
---|---|---|
Init | The user's UUID provided in the Proud Console, the UUID of the project the user created, and the user's own UniqueID. | The user writes this part of the function to connect ProudChat. We're taking 3 strings as parameters, but internally we're calling the ChatClientInitComplete, ChatClientInitFailed events via std::bind so we can see if the login succeeded or failed. |
Function Name | Parameters | Description |
---|---|---|
Disconnect | - | Use when you want to disconnect with the chat server. |
Function Name | Parameters | Description |
---|---|---|
IsConnected | - | Use when you check the status of server connection. |
JoinChannel | Unique key for the channel you want to access | Use when you want to access a specific channel. |
LeaveChannel | Unique key for the channel you want to leave | Use this when you want to leave the channel you're in. |
SendChannelMsg | A unique identification value for a specific channel, a message to send to the specific channel | Use to send a message to a specific channel. |
SendDirectMsg | A unique identification value for a specific recipient, a message to send to the specific party | Use to send a message to a specific person. |
MsgTranslate | src = The country code of current language target = The country code of the targeting language msgKey = A unique key of message to translate msg = A message to translate | (Beta) Use when you want to translate the message |
MsgTranslate_Auto | target = The country code of the targeting language msgKey = A unique key of message to translate msg = A message to translate | (Beta) Request the translation of the message after automatically detecting the language. |
MsgRecord_Channel | channelKey = A unique key of the channel day = The days (max 90) cnt = The counts (max 100) | (Beta) Request the chat data from the Channel. Retrieve up to 100 messages within the last 90 days. |
MsgRecord_Direct | target = A unique key of the target user day = The days (max 90) cnt = The counts (max 100) | (Beta) Request the data from the Direct messages. Retrieve up to 100 messages within the last 90 days. |
MsgRecord_Notice | day = The days (max 90) cnt = The counts (max 100) | (Beta) Request the data from the Notice. Retrieve up to 100 messages within the last 90 days. |
Event variable name | Description |
---|---|
InitComplete_Delegate | Event called when Init Complete completes. |
InitFailed_Delegate | Events called when Init Failed. |
ChatDisconnect_Delegate | Event fired when the chat server disconnected. |
ChannelMsg_Response_Delegate | It handles events that occur if a ChannelMsg arrives. |
DirectMsg_Response_Delegate | It handles events if the DirectMsg arrives between users. |
Notice_Response_Delegate | It will be called when you send Notice from Proud Console. |
Channel_Join_Success_Delegate | It will be called if Channel Join Success occurs. |
Channel_Join_Failed_Delegate | It will be called if Channel Join Failed occurs. |
Channel_Leave_Success_Delegate | It will be called if Channel Leave Success occurs. |
Channel_Leave_Failed_Delegate | It will be called if Channel Leave Failed occurs. |
MsgTranslate_Success_Delegate | (Beta) It will be called if the message is successfully translated. |
MsgTranslate_Failed_Delegate | (Beta) It will be called if the message translation fails. |
MsgRecord_Success_Delegate | (Beta) It will be called if the data history is successfully retrieved. |
MsgRecord_Failed_Delegate | (Beta) It will be called if the data history retrieval fails. |
Event variable name | Description |
---|---|
ChatClientInitComplete | It will be called if the server successfully connects with the ChatClient. |
ChatClientInitFailed | It will be called on server login failure. |
ChatDisconnect | It will be called if the server disconnects with the ChatClient. |
ChannelMsg_Response | It handles events that occur if a ChannelMsg arrives. |
DirectMsg_Response | It handles events if the DirectMsg arrives between users. |
Notice_Response | It will be called when you send Notice from Proud Console. |
Channel_Join_Success | It will be called if Channel Join Success occurs. |
Channel_Join_Failed | It will be called if Channel Join Failed occurs. |
Channel_Leave_Success | It will be called if Channel Leave Success occurs. |
Channel_Leave_Failed | It will be called if Channel Leave Failed occurs. |
MsgTranslate_Success | (Beta) It will be called if the message is successfully translated. |
MsgTranslate_Failed | (Beta) It will be called if the message translation fails. |
MsgRecord_Success | (Beta) It will be called if the data history is successfully retrieved. |
MsgRecord_Failed | (Beta) It will be called if the data history retrieval fails. |
Please refer to the links below.
For more information, see Building iOS.