https://github.com/edward-khaymanov/netcode-chat
Chat system built on unity Netcode for GameObjects with command and voting support
https://github.com/edward-khaymanov/netcode-chat
chat csharp game-development netcode-for-gameobjects unity unity-networking unity-plugin unity-tools
Last synced: 7 months ago
JSON representation
Chat system built on unity Netcode for GameObjects with command and voting support
- Host: GitHub
- URL: https://github.com/edward-khaymanov/netcode-chat
- Owner: Edward-Khaymanov
- License: mit
- Created: 2023-07-13T15:04:25.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-08-07T14:29:51.000Z (over 2 years ago)
- Last Synced: 2025-04-07T02:51:15.725Z (10 months ago)
- Topics: chat, csharp, game-development, netcode-for-gameobjects, unity, unity-networking, unity-plugin, unity-tools
- Language: C#
- Homepage:
- Size: 28.3 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Netcode-chat
Chat system built on unity Netcode for GameObjects with command and voting support
## Requirements
- Textmeshpro
- Netcode for GameObjects
## Preview


***


## Configure
In `ChatHandler` prefab you can see these options

- SystemMessageColor - when the system sends a message, the nickname is displayed in this color
- OwnerMessageColor - when a user sends a message, his nickname is displayed in this color
- ShowOnJoinMessage - should the system notify everyone about the user joining
- ShowOnLeaveMessage - should the system notify everyone about the user leaving
- OnJoinMessage - message after user nickname on join
- OnOnLeaveMessage - message after user nickname on leave
## Example
In `Example` folder you can see `ExampleScene` scene.
To test, you have to build the project twice with different "IsHost" parameters.
Or use the [ParrelSync](https://github.com/VeriorPies/ParrelSync) extension and modify the `Example` script like this
**Before:**
```C#
private void Start()
{
if (_isHost == false)
{
NetworkManager.Singleton.StartClient();
return;
}
//...
//...
//...
}
```
**After:**
```C#
private void Start()
{
if (ClonesManager.GetArgument() == "client")
_isHost = false;
else
_isHost = true;
if (_isHost == false)
{
NetworkManager.Singleton.StartClient();
return;
}
//...
//...
//...
}
```