Netcode-Chat

Chat system built on unity Netcode for GameObjects with command and voting support

MIT License

Stars
4
Committers
1

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 extension and modify the Example script like this

Before:


private void Start()
{
    if (_isHost == false)
    {
        NetworkManager.Singleton.StartClient();
        return;
    }
    //...
    //...
    //...
}

After:


private void Start()
{
    if (ClonesManager.GetArgument() == "client")
        _isHost = false;
    else
        _isHost = true;
    
    if (_isHost == false)
    {
        NetworkManager.Singleton.StartClient();
        return;
    }
    //...
    //...
    //...
}

Related Projects