Tutorial
This is a simple chat client built with BACKND Chat.
Unity package file
Development environment
Unity version | BACKND SDK version | .NET Framework version |
---|---|---|
2020.1.3f1 | 5.9.0 | .NET Framework 4 |
Included functions
Included function | Description |
---|---|
Custom sign-up/login | Custom account sign-up/login |
Nickname | Nickname settings |
Chat status | Looks up chat status |
Server connection check | Checks the connection to the server |
General/guild channel entrance/leave | Enters or leaves general/guild channel |
Recent chats | Loads recent chats |
Chat | sends/receives chats |
Whisper | Sends/receives whispers |
Operator chat | Sends/receives operator announcements |
User block | Blocks/unblocks a user |
Report | Reports a user |
Filter | Enables/disables the chat filter |
Automatic connection termination | Disconnect automatically after no activity for a set time |
Spam prevention | Prevention of spam chatting |
1. Activate BACKND Chat.
Click Activate BACKND Chat button in the BACKND Console - BACKND Chat menu.
2. Create channel groups(general, guild)
Click Create new group button on the BACKND Chat - Channel Group Management to create a general channel and guild channel.
When the automatic channel creation is disabled, you must create the channels manually.
3. Configure the Unity BACKND Inspector.
Import the BACKND Chat example and set the project through The Backend > Edit Settings menu at the top of Unity.
4. Configure the Unity scene.
Register the ChatTest-login scene and the ChatTest-channellist scene in the Assets > TheBackend > Example > chat
folder in the Unity Project.
You can register the current scene by clicking the Add Open Scenes button in File - BuildSettings, the menu at the top of Unity.
- ChatTest-login scene should be assigned to index 0, and then ChatTest-channellist assigned to index 1; ChatTest-login is the start scene.
5. Log in
Log in or sign up as a member by playing the project.
6. Search a channel group
Choose the channel type(public or guild) to search, enter the group name, and press the Search button.
- With BACKND Chat, you can send and receive chats in the general channel and guild channel simultaneously.
After searching, when channel objects are created, you can enter them by clicking Enter.
7. Send messages
After entering, you can send a message by entering it in the input box at the bottom and clicking the Send Message button.
When you chat,
you can enter commands in the input box.
The commands are as follows(quotation marks removed):
Function | Command | Example |
---|---|---|
Whisper | /w "Nickname" "Message wished to be sent to the user with the nickname" | /w timmy See you in the garden! |
Operator announcement | /all "Announcement to be entered" | /all Today, at 4 o'clock, the game will be under maintenance |
Block | /b "Nickname" | /b timmy |
Unblock | /ub "Nickname" | /ub timmy |
Report | /Report "Nickname" | /Report timmy |
8. Switch to a public/guild channel.
Use the checkbox on top to toggle between public and guild channels.
If you have not entered a guild channel after entering a general channel, clicking the guild toggle will send you to the group search screen.
9. Leave the channel.
Press the Exit button in the chat window to leave the channel.