Unet Voice Chat With Lobby Support Implement

Hi,
I tested this lib. with unet and its working.Now i am trying to implement it to my game.When the game start i try to active voice chat with this code but it doesnt work.Anyone have suggessions how can i solve this ?
The issue is OnProxyRequested is not called on client.

 public override void OnClientSceneChanged(NetworkConnection conn)
    {


        if (SceneManager.GetActiveScene().name != "Main_VR")
        {
         
            VoiceChatNetworkProxy.OnManagerStartClient(client);

            VoiceChatNetworkProxy.OnManagerClientConnect(conn);

        }
        base.OnClientSceneChanged(conn);
    }
    public override void OnServerSceneChanged(string sceneName)
    {


        if (sceneName != "Main_VR")
        {
              VoiceChatNetworkProxy.OnManagerStartServer();
        }
        else
        {
              VoiceChatNetworkProxy.OnManagerStopServer();
        }
        base.OnServerSceneChanged(sceneName);
    }

Github: unityassets/VoiceChat/Assets/VoiceChat/Scripts/Demo/HLAPI/VoiceChatNetworkManager.cs at master · alkamegames/unityassets · GitHub

OnProxyRequested

1 Like

Hey @Eiseno . I would also like to implement voice chat into my game. I found this forum through the NAT Traversal forum. Am I correct to assume that you are also using NAT Traversal? If so, it will make working together to try to figure this out much easier.

1 Like

@Eiseno Also. Could upload your project with the voice chat working with UNET? It would solving this issue much easier as I would not have to go back and solve what you already have solved.

@Eiseno I just got done integrating voice chat with NAT Traversal! It is pretty late for me right now so I will put together a small example project and upload it to this forum for people to check out tomorrow. I will not include the NAT Traversal asset inside the project. The only things that will be included will be the scripts and the voice chat asset. You will have to import NAT Traversal separately.

The asset by default comes working with UNET, but if you would like NAT Traversal so you can have direct connections, here is the link to the NAT Traversal forum.

Here’s the link if anyone wants to check out where I got the voice chat asset. (Credit to @Eiseno for discovering the asset).

Hi @TCROC
Yes i am using Nat traversal but cant figure how to use.If you share sample project it will be really good.I spend 1 week and cant figure anything :slight_smile:

@Eiseno Here is the example project of NAT Traversal compatibility with voice chat. This project does not contain the NAT Traversal asset. You will have to import it separately. It only contains scripts that work with NAT Traversal and the voice chat asset. I hope this comes of good use to people :slight_smile:

The asset by default comes working with UNET, but if you would like NAT Traversal so you can have direct connections, here is the link to the NAT Traversal forum.
https://forum.unity3d.com/threads/r…ort-forwarding-punch-through-and-more.395835/

Here’s the link if anyone wants to check out where I got the voice chat asset. (Credit to @Eiseno for discovering the asset).

1 Like