Voice Chat
This voice chat functionality has been deprecated in favour of the SteamCore PRO voice chat functionality. SteamCore PRO voice chat is built into the OSS and also enables you to select Microphone Input.
PLAYERSTATE
The PlayerState is a replicated object that exists on all clients and the server so it’s an ideal place to store data that needs to be broadcasted to all players on the server, so in this example we’re going to use a custom PlayerState object to send our Voice data to all the clients.
REPLICATEAUDIODATA EVENT
Make sure this event is a “Multicast” type event
PLAYERCONTROLLER
Inside our PlayerController is where we’re going to be capturing our Audio Data, sending it to the server and then the server will broadcast it to our player state and all other players, let’s take a look at the logic:
Make sure the “SendAudioData” is of type “Run on Server“