Photon Voice set InterestGroups

Options
Hello, I am trying to set private areas in world so that when you get in that area you can only hear and talk to the people in that specific area, but nothing I try seems to work. The interest group does change in the inspector when I enter the zone, but I can still hear and talk to everyone outside that zone.

I also noticed that I get this error when entering the private zone for the first time: Operation ChangeGroups (248) not allowed on current server (NameServer).

Here's a sample of last thing I tried. This script is attached to the player object that are instantiated when entering the room.

public void OnTriggerEnter(Collider other) // When entering private room
{
if (other.tag == "Room")
{
roomNumber = other.gameObject.GetComponent<ZoneSettings>().zoneNumber;
PhotonVoiceNetwork.Instance.Client.OpChangeGroups(null, new byte[1] { roomNumber });
recorder.InterestGroup = roomNumber;
Debug.Log("Entered room: " + roomNumber);
}
}

public void OnTriggerExit(Collider other) // When getting out of private room
{
if (other.tag == "Room")
{
Debug.Log("Out of room: " + roomNumber);
PhotonVoiceNetwork.Instance.Client.OpChangeGroups(new byte[1] { roomNumber }, null);
roomNumber = 0;
recorder.InterestGroup = roomNumber;
}

}

Thanks

Comments

This discussion has been closed.