The following code does establish Photon Voice networking but the quality of voice is not good. Plus there is a lot of noise. How do I make sure that there is minimal noise? Furthermore how do I pause and unpause sending of voice to the other users?
using UnityEngine;
using System.Collections;
using Photon;
public class NetworkManager : Photon.PunBehaviour
{
private GameObject studymaterial;
void Start()
{
PhotonNetwork.ConnectUsingSettings("0.1");
PhotonNetwork.automaticallySyncScene = true;
PhotonVoiceNetwork.Connect();
PhotonNetwork.logLevel = PhotonLogLevel.Full;
studymaterial = null;
}
void OnGUI()
{
GUILayout.Label(PhotonNetwork.connectionStateDetailed.ToString());
}
public override void OnJoinedLobby()
{
RoomOptions roomOptions = new RoomOptions() { isVisible = true, maxPlayers = 18 };
PhotonNetwork.JoinOrCreateRoom("Class", roomOptions, TypedLobby.Default);
}
public override void OnJoinedRoom()
{
PhotonNetwork.Instantiate("User", new Vector3(0, 1, 0), Quaternion.identity, 0);
// studymaterial = PhotonNetwork.Instantiate("Heart3D", new Vector3(2, 1, 0), Quaternion.identity, 0);
}
}