Unity3D

Download the ProudChat Unity SDK from the link below.

Project settings

Add Unity PackageFile

ProudChatUnityPackage downloaded via git Add the Package via Assets -> Import Package -> custom Package at the top of the Unity Editor.

Import all the package files.

Setting up plugins

circle-info

Please see Plugin settings.

ProudChatComponent

The ProudChatComponent makes it easy for users to get each of the features they need for chat.

triangle-exclamation

- ProudChat_Init

This is the part that initializes the ChatClient. The user must call the Init function to connect to the server before using it.

Function Name
Parameters
Description

ProudChat_Init

The user's UUID from the Proud Consolearrow-up-right, the UUID of the project the user created, and the user's own UniqueID.

You write this part as a function to connect the ChatClient with the server. We're getting 3 strings as parameters, but internally we're calling the ChatClientInitComplete, ChatClientJoinFailed functions so we can see if the login was successful or unsuccessful.

- Disconnect

Function Name
Parameters
Description

Disconnect

-

Use when you want to disconnect with the chat server.

- Function

Function Name
Parameters
Description

IsConnected

-

Use when you check the status of server connection.

Join_Channel

Unique key for the channel you want to access

Use when you want to access a specific channel.

Leave_Channel

Unique key for the channel you want to leave

Use this when you want to leave the channel you're in.

Send_Direct_Msg

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.

Send_Channel_Msg

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.

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 Variables

Event function name
Description

m_ClientInitComplete_Event

Event fired when ChatClient completes Init.

m_ClientInitFailed_Event

Event fired when ChatClient Init Failed occurs.

m_ChatDisconnect_Event

Event fired when the chat server disconnected.

m_DirectMsg_Response_Event

It handles events if the DirectMsg arrives between users.

m_ChannelMsg_Response_Event

It handles events that occur if a ChannelMsg arrives.

m_Notice_Response_Event

It will be called when you send Notice from Proud Console.

m_Channel_Join_Success_Event

It will be called if Channel Join Success occurs.

m_Channel_Join_Failed_Event

It will be called if Channel Join Failed occurs.

m_Channel_Leave_Success_Event

It will be called if Channel Leave Success occurs.

m_Channel_Leave_Failed_Event

It will be called if Channel Leave Failed occurs.

m_Msg_Translate_Success_Event

(Beta) It will be called if the message is successfully translated.

m_Msg_Translate_Failed_Event

(Beta) It will be called if the message translation fails.

m_Msg_Record_Success_Event

(Beta) It will be called if the data history is successfully retrieved.

m_Msg_Record_Failed_Event

(Beta) It will be called if the data history retrieval fails.

Building

- Android

- iOS

circle-check

Last updated